Resource Base
Table of contents

ImageManager

The ImageManager class provides APIs for managing images. At present, it has only one API to save an image as a file.

Name Description
saveToFile() Saves the specified image in either PNG or JPG format.

saveToFile

This method saves an image in either PNG or JPG format. The desired file format is inferred from the file extension provided in the ‘name’ parameter.

Should the specified file format be omitted or unsupported, the data will default to being exported in PNG format.

saveToFile(image: Core.DSImageData, name: string, download?: boolean): Promise<File>;

Parameters

image: The image to be saved, of type Core.DSImageData.

name: The name of the file, as a string, under which the image will be saved.

download: An optional boolean flag that, when set to true, triggers the download of the file.

Return Value

A Promise that resolves with the saved File object.

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(2.2.10)
    • Version 2.x
      • Version 2.0.30
      • Version 2.0.20
      • Version 2.0.10
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support