Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

DynaPDF.GetImage

retrieves the properties of an image as well as the decompressed image buffer if needed. By default all images are returned decompressed, with exception of image types which are already stored in a valid file format like JPEG and JPEG 2000 images.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 6.4 Yes Yes Yes Yes Yes

MBS( "DynaPDF.GetImage"; PDF; Index; Selector { ; FileName } )

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Index The index of the image from 0 to DynaPDF.GetImageCount-1. $index
Selector Which value to query. "Picture"
FileName Optional
In case we return a container value, the file name to use.
"test.jpg"

Result

Returns OK or error.

Description

retrieves the properties of an image as well as the decompressed image buffer if needed. By default all images are returned decompressed, with exception of image types which are already stored in a valid file format like JPEG and JPEG 2000 images.
If all image types should be decompressed set the flag pfDecompressAllImages.
Selectors include:
BufSizeThe size of the image buffer in bytes.
BufferThe image data as JPEG or FILE.
PictureThe image as a picture container. Either JPEG or TIFF.
FilterThe format of image: Required decode filter if the image is compressed. Possible values are dfDCTDecode (JPEG), dfJPXDecode (JPEG2000), and dfJBIG2Decode. Other filters are already removed by DynaPDF since a conversion to a native file format is then always required.
OrgFilterThe image was compressed with this filter in the PDF file. This info is useful to determine which compression filter should be used when creating a new image file from the image buffer.
BitsPerPixel Bit depth of the image buffer. Possible values are 1, 2, 4, 8, 24, 32, and 64.
ColorSpaceThe color space refers either to the image buffer or to the color table if set.
NumComponentsThe number of components stored in the image buffer.
MinIsWhiteIf 1, the colors of 1 bit images are reversed.
ColorCountThe number of colors in the color table.
WidthImage width in pixel.
HeightImage height in pixel.
ScanLineLengthThe length of a scanline in bytes.
InlineImageIf 1, the image is an inline image.
InterpolateIf 1, image interpolation should be performed.
TransparentThe meaning is different depending on the bit depth and whether a color table is available. If the image is a 1 bit image and if no color table is available, black pixels must be drawn with the current fill color. If the image contains a color table, ColorMask contains the range of indexes in the form min/max index which should appear transparent. If no color table is present ColorMask contains the transparent ranges in the form min/max for every color component.
IntentThe rendering intent. Default is none.
MetadataSizeLength of Metadata in bytes.
ResolutionXImage resolution on the x-axis.
ResolutionYImage resolution on the y-axis.
MetadataOptional XML Metadata stream as text.
ICCProfileICC Color Profile of the colorspace (can be empty).
MaskImageIf set, a 1 bit image is used as a transparency mask. Returns index of that image.
SoftMaskIf set, a grayscale image is used as alpha channel. Returns index of that image.

See also


DynaPDF.GetGStateFlags   -   DynaPDF.GetImageCount

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins