Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.ReadImageFormatFile

The function retrieves the most important properties of an image file.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.ReadImageFormatFile"; PDF; Path { ; Index } )   More

Parameters

Parameter Description Example Flags
PDF The PDF reference returned from DynaPDF.New. $pdf
Path The native path for the image file. "C:\test\test.jpg"
Index The index of the image for multi image files. 1 Optional

Result

Returns image format or error message.

Description

The function retrieves the most important properties of an image file.
The function reads only the image header to improve processing speed. If the parameter BitsPerPixel is 32 the image is a CMYK image. Note that TIFF images support color depths up to 64 bits per pixel. The parameter Index specifies the array index of a multi-page image that should be read in; numbering starts at 1. The parameter is ignored for non-multi-page image formats.
Image format is returned as a text with width, height and bits per pixel separated by newline.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.

Examples

Read format information for a file:

Set Variable [ $format; Value: MBS(“DynaPDF.ReadImageFormatFile"; $pdf; "/Users/cs/Desktop/täst.png") ]

Example result:
956
736
24
0

See also

Release notes

  • Version 15.2
    • Added DynaPDF.ReadImageFormatFile and DynaPDF.ReadImageResolutionFile function to inspect images files on disk.

Blog Entries

This function checks for a license.

Created 21st March 2025, last changed 28th March 2025


DynaPDF.ReadImageFormat - DynaPDF.ReadImageResolution