Saves images in DcsBuffer to the App sandbox directory synchronously.


func save(indices:[Any], file:String, encodeParameter:DcsEncodeParameter)


indices:[Any] An index array for images to be saved.
file:String Full path for the images to be saved.
encodeParameter:DcsEncodeParameter Its value will be chosen from DcsPNGEncodeParameter, DcsJPEGEncodeParameter or DcsPDFEncodeParameter which represents to save the images as PNG, JPG or PDF files.

Return value



encodeParameter Maximum Value Result if the value exceeds the maximum value
DcsPNGEncodeParameter 1 Save the first image as PNG file.
DcsJPEGEncodeParameter 1 Save the first image as JPG file.
DcsPDFEncodeParameter no limit Save the images as a multi-page PDF.


Circumstance Exception thrown
License verification failed. DcsLicenseVerificationFailedException
There is not enough memory. DcsStorageSpaceLimitException
Indices/encodeParameter/file is nil. DcsValueNotValidException
Indices include a value not smaller than DcsBuffer.count. DcsValueOutOfRangeException


Is this page helpful?

Leave a Reply

Your email address will not be published.