DynaPDF.ReadImageResolution
---------------------------

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

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

MBS( "DynaPDF.ReadImageResolution"; PDF; Container { ; Index } ) 

**MBS**( **"DynaPDF.ReadImageResolution";** /\* The function retrieves the horizontal and vertical resolution of an image file. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Container**; /\* The image container value. Pass the container field or a variable with the container content.e.g. $image \*/   
**$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 |  |
| Container | The image container value. Pass the container field or a variable with the container content. | $image |  |
| 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.  
See also [ReadImageResolution](https://www.monkeybreadsoftware.com/DynaPDF-Manual/ReadImageResolution.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.AppendImagePage](DynaPDFAppendImagePage.md)
- [DynaPDF.AppendImagePages](DynaPDFAppendImagePages.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.ReadImageResolutionFile](DynaPDFReadImageResolutionFile.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.
- **Version 14.5**
    - Improved [DynaPDF.GeneratePreview](https://www.mbsplugins.eu/DynaPDFGeneratePreview.shtml), [DynaPDF.ReadImageResolution](https://www.mbsplugins.eu/DynaPDFReadImageResolution.shtml), [DynaPDF.ReadImageFormat](https://www.mbsplugins.eu/DynaPDFReadImageFormat.shtml), [DynaPDF.InsertImage](https://www.mbsplugins.eu/DynaPDFInsertImage.shtml), [DynaPDF.AttachFileContainer](https://www.mbsplugins.eu/DynaPDFAttachFileContainer.shtml), [DynaPDF.AddOutputIntentEx](https://www.mbsplugins.eu/DynaPDFAddOutputIntentEx.shtml), [DynaPDF.CreateICCBasedColorSpaceContainer](https://www.mbsplugins.eu/DynaPDFCreateICCBasedColorSpaceContainer.shtml) and [DynaPDF.OpenPDFFromContainer](https://www.mbsplugins.eu/DynaPDFOpenPDFFromContainer.shtml) to return proper error if container is empty.

### Example Databases

- [DynaPDF/Picture to PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Picture%20to%20PDF.shtml#3ScriptAnchor_)
- [OCR/OCR with DynaPDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/OCR/OCR%20with%20DynaPDF.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 14.5pr8](https://www.mbsplugins.de/archive/2024-11-08/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[DynaPDF.ReadImageFormatFile](DynaPDFReadImageFormatFile.md) - [DynaPDF.ReadImageResolutionFile](DynaPDFReadImageResolutionFile.md)

[HTML Version](DynaPDFReadImageResolution.shtml)