NormalizedImageResult
Stores the normalized image result.
Attributes
Attribute | Type |
---|---|
image |
DDNImage |
image
The normalized image in DDNImage structure.
APIs
API | Descriptions |
---|---|
saveToFile() |
Saves the normalized image to file. |
saveToFile
Save the normalized image (only one) to a File
object in memory. Download it to the local driver if needed.
saveToFile: (name: string, download?: boolean) => Promise<File>;
Parameters
name
: specifies the name of the File
object in memory. If a File
object with the same name exists, replace it. A file extension shall be used in the name to specify the file’s format. All image formats are valid. If not specified, use PNG
format as default.
download
: specifies whether to download the file once it’s created. If set to false or not specified, keep the file in memory.
Return value
A promise resolving to the File
that stores the normalized image data.
Code snippet
let resultImg = await normalizedImageResult.saveToFile("example.png");