Files
pqAutomationApp/UniTAP/dev/ports/modules/internal_utils/image_utils.py
xinzhu.yin c157e774e5 1.1.0版本
2026-04-16 16:51:05 +08:00

28 lines
1.1 KiB
Python

from UniTAP.libs.lib_uicl.uicl import *
def save_video_to_bin(path: str, data: list):
raise NotImplementedError(f"Temporary not supported saving to bin file format.")
def save_video_to_mp4(path: str, data: list):
raise NotImplementedError(f"Temporary not supported saving to mp4 file format.")
def save_image_to_bin(path: str, image_object: UICL_Image):
res = UICL_SaveToFile(image_object, path, ImageFileFormat.FILE_FORMAT_BIN)
if res != 0:
raise SystemError(f"Error saving image to BIN format. Error code {res}. Description {uicl_errors.get(res)}")
def save_image_to_bmp(path: str, image_object: UICL_Image):
res = UICL_SaveToFile(image_object, path, ImageFileFormat.FILE_FORMAT_BMP)
if res != 0:
raise SystemError(f"Error saving image to BMP format. Error code {res}. Description {uicl_errors.get(res)}")
def save_image_to_ppm(path: str, image_object: UICL_Image):
res = UICL_SaveToFile(image_object, path, ImageFileFormat.FILE_FORMAT_PPM)
if res != 0:
raise SystemError(f"Error saving image to PPM format. Error code {res}. Description {uicl_errors.get(res)}")