SaveSelectedImagesToBase64Binary()

Description

Saves the selected images in buffer to a base64 string.

Syntax

.SaveSelectedImagesToBase64Binary();

Parameters

None

Return value

<string>

The result string is the pure base64 string with no extra info. For example,
"/9j/4AAQSkZJRgABA...".
To use the string in most circumstances, you need to add extra info like
data:image/png;base64,"/9j/4AAQSkZJRgABA...".

Remarks

Please invoke GetSelectedImagesSize before invoking this method to specify the target format. The default value is IT_JPG and it doesn't support B/W images.

See also

GetSelectedImagesSize
SetSelectedImageIndex

Example

var imagedata;
DWObject.SelectedImagesCount = 1;
DWObject.SetSelectedImageIndex(0, 0);
DWObject.GetSelectedImagesSize(EnumDWT_ImageType.IT_JPG);
imagedata = DWObject.SaveSelectedImagesToBase64Binary();
newImage.src = "data:image/png;base64," + imagedata;