NormalizedImageResultItem
The NormalizedImageResultItem
interface extends the CapturedResultItem
interface and represents a normalized image result item.
interface NormalizedImageResultItem extends CapturedResultItem {
imageData: DSImageData;
location: Quadrilateral;
toCanvas(): HTMLCanvasElement;
toImage(MIMEType: "image/png" | "image/jpeg"): HTMLImageElement;
toBlob(MIMEType: "image/png" | "image/jpeg"): Promise<Blob>;
saveToFile(name: string, download?: boolean): Promise<File>;
}
imageData
The image data for the normalized image result.
See Also
location
The location where the normalized image was extracted from within the original image, represented as a quadrilateral.
See Also
toCanvas
Converts the normalized image data into an HTMLCanvasElement for display or further manipulation in web applications.
See Also
toImage
Converts the normalized image data into an HTMLImageElement of a specified MIME type (‘image/png’ or ‘image/jpeg’).
See Also
toBlob
Converts the normalized image data into a Blob object of a specified MIME type (‘image/png’ or ‘image/jpeg’).
See Also
saveToFile
Saves the normalized image to a File object in memory, optionally downloading it to the user’s device.
Parameters
name
: the name to assign to the File object.
download
optional. If true, triggers the download of the file once created; otherwise, retains the file in memory.
See Also