Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

GMImage.NewFromFile

Loads a picture file.

Component Version macOS Windows Linux Server iOS SDK
GraphicsMagick 2.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "GMImage.NewFromFile"; Path { ; Magick } )   More

Parameters

Parameter Description Example Flags
Path The platform specific file path. "/test.jpg"
Magick Available in MBS FileMaker Plugin 8.4 or newer.
The magick setting to define which codec to use.
"JPG" Optional

Result

Returns the ImageRef number on success.

Description

Loads a picture file.
Please call GMImage.Release later to free memory for this image.
Image reference numbers are starting at 18000 and counting up for each new image.

If image doesn't load, please check whether it's a HEIC, HEIF or RAW image. For those, please use Container.ReadImage first to convert on macOS/iOS to PNG and then use GMImage.NewFromContainer function.

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.

See also

Release notes

Example Databases

Blog Entries

Created 18th August 2014, last changed 27th November 2020


GMImage.NewFromContainer - GMImage.NewFromHex

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins

Start Chat