RasterFrame_GetEmbThumb

Extract the embedded thumbnail from a raster frame and return it as a BLOB.
RasterFrame_GetEmbThumb(imgDocRef{; frameIdx{; options}}) ➔ thumb
imgDocRef Text The raster document reference.
frameIdx Longint The index of the image frame.
options Object Thumbnail extraction and encoding options.
thumb BLOB The thumbnail data.

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

The thumbnail image is returned as a BLOB. To convert the BLOB to a 4D picture, call BLOB TO PICTURE, or call directly RasterFrame_GetEmbThumbPict which is a convenience wrapper for this method.

Parameter imgDocRef is the raster document reference.

Parameter frameIdx is the index of the image frame. Passing 0 or omitting this parameter is the same as passing 1.

The options 4D object 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

This method is a convenience wrapper for the RasterFrame_GetEmbThumb_JSN plug-in method.