Decode the string to image object, and return the image object asynchronously. If the string cannot be decoded, throw an exception.
the string, based on encoding parameter, default is base64
the encoding format, default is base64
Decode the image from Buffer, and return the decoded image object asynchronously. If the decoding failed, throw an exception.
Decode the image from Buffer, and return the decoded image object synchronously. If the decoding failed, throw an exception.
Decode the string to image object, and return the image object synchronously. If the string cannot be decoded, throw an exception.
the string, based on encoding parameter, default is base64
the encoding format, default is base64
Encode the image to string, and return the encoded string asynchronously.
the encoding format, default is base64
the image compress format, default is png. The available values are: png, jpg, jpeg, webp.
the image quality, range 0-100. The default value is 100.
Encode the image to string, and return the encoded string synchronously.
the encoding format, default is base64
the image compress format, default is png. The available values are: png, jpg, jpeg, webp.
the image quality, range 0-100. The default value is 100.
Encode the image to Buffer, and return the encoded Buffer object asynchronously.
the image compress format, default is png. The available values are: png, jpg, jpeg, webp.
the image quality, range 0-100. The default value is 100.
Encode the image to Buffer, and return the encoded Buffer object synchronously.
the image compress format, default is png. The available values are: png, jpg, jpeg, webp.
the image quality, range 0-100. The default value is 100.
Load the file at the specified url, and return the image object asynchronously. If the url cannot be accessed or the image cannot be decoded, then throw an exception.
the url address, must start with https or http
Read the file at the specified path, and return the image object asynchronously. If the file does not exist or cannot be decoded, then throw an exception.
the file path, support relative path
Read the file at the specified path, and return the image object synchronously. If the file does not exist or cannot be decoded, then throw an exception.
the file path, support relative path
Write the image asynchronously to the specified path.
the file path, support relative path. The file path must end with one of the following extensions: .jpg, .jpeg, .png, .webp.
the image quality, range 0-100. The default value is 100.
Write the image synchronously to the specified path.
the file path, support relative path. The file path must end with one of the following extensions: .jpg, .jpeg, .png, .webp.
the image quality, range 0-100. The default value is 100.
image module provides image reading, grayscale, cropping, scaling, template matching, etc. functions. The main APIs are functions of this page and the Image class.
The functions of screen capture have been moved to the media_projection module. Also, the functions of opencv are directly available in the @autojs/opencv module.