RasterFrame_GetEmbThumb_JSN

Extract the embedded thumbnail of a raster frame.
RasterFrame_GetEmbThumb_JSN(imgDocRef;frameIdx;optionsJSON) ➔ thumb
imgDocRef Text The raster document reference.
frameIdx Longint The raster frame index.
optionsJSON Text Thumbnail extraction and encoding options.
↩︎ thumb BLOB The embedded thumbnail data.

Extract the embedded thumbnail from a raster frame, if one exists.

Parameter imgDocRef is the raster document reference.

Parameter frameIdx is the index of the image frame.

The optional optionsJSON parameter is a 4D object serialized in JSON format that may contain the following properties:

Thumbnail Extraction Options
Property name Type Default Description
ApplyOrientation Boolean True The option’s value specifies whether or not the returned thumbnail should have its orientation fixed.
Thumbnail Encoding Options
Property name Type Default Description
Format String TIFF The option’s value specifies the image format of the thumbnail. The thumbnail format can be be one of JPEG, TIFF, or PNG.
LossyCompressionQuality Real 0.75

Effective when the thumbnail is encoded in JPEG format, this option’s value is a real number in the range of 0.0 to 1.0, specifying the image quality.

The higher this number is, the higher the quality of the encoded thumbnail will be at the expense of larger size in bytes. Lower numbers produce smaller encoded thumbnails in bytes, at the expense of lower image quality.

TIFFMonochromeEncoding Longint kTIFFCompressionCCITTFax4

Effective when the thumbnail is encoded in TIFF format, this option’s value is a number specifying the TIFF encoding method for black and white images.

Can be one of: kTIFFCompressionNone, kTIFFCompressionCCITTRLE, kTIFFCompressionCCITTFax3, kTIFFCompressionCCITTFax4.

TIFFGrayscaleEncoding Longint kTIFFCompressionLZW

Effective when the thumbnail is encoded in TIFF format, this option’s value is a number specifying the TIFF encoding method for grayscale images.

Can be one of: kTIFFCompressionNone, kTIFFCompressionLZW, kTIFFCompressionDeflate.

TIFFColorEncoding Longint kTIFFCompressionLZW

Effective when the thumbnail is encoded in TIFF format, this option’s value is a number specifying the TIFF encoding method for color images.

Can be one of: kTIFFCompressionNone, kTIFFCompressionLZW, kTIFFCompressionDeflate.

Note

The RasterFrame_GetEmbThumb method in the Q2PixLib component is a convenience wrapper to this plug-in method that accepts the options parameter directly as a 4D object instead of a JSON serialization.