DynaPDF.ReadImageResolutionFile
-------------------------------

The function retrieves the horizontal and vertical resolution of an image file.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [15.2](newinversion152.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.ReadImageResolutionFile"; PDF; Path { ; Index } ) 

**MBS**( **"DynaPDF.ReadImageResolutionFile";** /\* The function retrieves the horizontal and vertical resolution of an image file. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Path**; /\* The native path for the image file.e.g. "C:\\test\\test.jpg" \*/   
**$Index**) /\* Optional; The index of the image for multi image files.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $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 the x and y resolution values as text separated by newline character.

### Description

The function retrieves the horizontal and vertical resolution of an image file.   
The image resolution is a user defined value that can be stored in certain image formats such as Bitmap or TIFF.  
The function returns zero values if the image format does not support a resolution record or if no values are stored in the image file, the image resolution is then 72 DPI.  
  
This function requires a native path. Use [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md) 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](component_FileDialog.md) functions.  
For Server be aware that server has limited permissions and may not be able to access all files on a computer.  
### Examples

Read resolution information for a file:

 Set Variable \[ $resolutions ; Value: MBS (“DynaPDF.ReadImageResolutionFile"; $pdf ; "/Users/cs/Desktop/täst.png") \]  
<small>  
Example result:   
144  
144</small>### See also

- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.ReadImageResolution](DynaPDFReadImageResolution.md)
- [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md)

### Release notes

- **Version 15.2**
    - Added [DynaPDF.ReadImageFormatFile](https://www.mbsplugins.eu/DynaPDFReadImageFormatFile.shtml) and [DynaPDF.ReadImageResolutionFile](https://www.mbsplugins.eu/DynaPDFReadImageResolutionFile.shtml) function to inspect images files on disk.

### Blog Entries

- [News in MBS FileMaker Plugin 15.2](https://www.mbsplugins.de/archive/2025-05-13/News_in_MBS_FileMaker_Plugin_1/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 15.2 für Claris FileMaker](https://www.mbsplugins.de/archive/2025-05-06/Neues_MBS_Plugin_152_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 15.2 for Claris FileMaker](https://www.mbsplugins.de/archive/2025-05-06/MBS_Plugin_152_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.2pr1](https://www.mbsplugins.de/archive/2025-04-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

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

  
[DynaPDF.ReadImageResolution](DynaPDFReadImageResolution.md) - [DynaPDF.Rectangle](DynaPDFRectangle.md)

[HTML Version](DynaPDFReadImageResolutionFile.shtml)