GMImage.NewImagesFromFile
-------------------------

Loads a picture file with several files.

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

MBS( "GMImage.NewImagesFromFile"; Path ) 

**MBS**( **"GMImage.NewImagesFromFile";** /\* Loads a picture file with several files. \*/  
**$Path**) /\* The platform specific file path.e.g. "/test.tif" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The platform specific file path. | "/test.tif" |

### Result

Returns list of image references or error.

### Description

Loads a picture file with several files.   
This is for loading multi image tiff files.  
Please call [GMImage.Release](GMImageRelease.md) later to free memory for each image.  
Image reference numbers are starting at 18000 and counting up for each new image.  
### Examples

Loads from file and writes to other file:

 Set Variable \[$img ; Value:MBS ("GMImage.NewImagesFromFile"; "/Users/cs/Desktop/test.jpg")\]  
If \[MBS ("IsError") = 0\]  
 Set Variable \[$r ; Value:MBS ( "[GMImage.WriteToFile](GMImageWriteToFile.md)"; $img ; "/Users/cs/Desktop/test.tif" )\]  
 Set Variable \[$r ; Value:MBS ( "[GMImage.Release](GMImageRelease.md)"; $img )\]  
End If  
### See also

- [GMImage.GetXMP](GMImageGetXMP.md)
- [GMImage.New](GMImageNew.md)
- [GMImage.NewImagesFromContainer](GMImageNewImagesFromContainer.md)
- [GMImage.Release](GMImageRelease.md)
- [GMImage.WriteImages](GMImageWriteImages.md)
- [GMImage.WriteToFile](GMImageWriteToFile.md)
- [IsError](IsError.md)

### Release notes

- **Version 8.5**
    - Changed [GMImage.NewImagesFromFile](http://www.mbsplugins.eu/GMImageNewImagesFromFile.shtml) to reject .PDF file as GraphicsMagick doesn't really read PDF files.

### Blog Entries

- [GraphicsMagick in FileMaker, part 1](https://www.mbsplugins.de/archive/2022-12-01/GraphicsMagick_in_FileMaker_pa/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.5pr8](https://www.mbsplugins.de/archive/2018-11-22/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 5.1pr1](https://www.mbsplugins.de/archive/2015-03-16/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 11st March 2015 , last changed 11st April 2023

  
[GMImage.NewImagesFromContainer](GMImageNewImagesFromContainer.md) - [GMImage.Normalize](GMImageNormalize.md)

[HTML Version](GMImageNewImagesFromFile.shtml)