GMImage.GetPNGAsHex
-------------------

Returns the picture in PNG format as a hex encoded string.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [GraphicsMagick](component_GraphicsMagick.md) | [3.0](newinversion30.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "GMImage.GetPNGAsHex"; ImageRef ) 

**MBS**( **"GMImage.GetPNGAsHex";** /\* Returns the picture in PNG format as a hex encoded string. \*/  
**$ImageRef**) /\* The image reference number.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ImageRef | The image reference number. | 1 |

### Result

Returns text.

### Description

Returns the picture in PNG format as a hex encoded string.  
For the quality setting use the SetQuality function.  
Useful for storing in database.  
### See also

- [GMImage.GetJPEGAsHex](GMImageGetJPEGAsHex.md)
- [GMImage.GetPNGAsBase64](GMImageGetPNGAsBase64.md)

### Example Databases

- [GraphicsMagick/Picture Text Encoding](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/GraphicsMagick/Picture%20Text%20Encoding.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS Filemaker Plugin, version 3.0pr3](https://www.mbsplugins.de/archive/2012-10-19/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

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

  
[GMImage.GetPNGAsBase64](GMImageGetPNGAsBase64.md) - [GMImage.GetPage](GMImageGetPage.md)

[HTML Version](GMImageGetPNGAsHex.shtml)