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:
12.0
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
Statistic
FMM
Blog
GMImage.NewFromContainer
Loads a picture from the given container.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 2.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
data | A value from a Container Field. Can include various image formats like JPEG, PNG or just containers with FILE data. |
Result
Returns the ImageRef number on success.
Description
Loads a picture from the given container.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/Windows.
When the container has a PDF, the plugin may just load the preview image. Please use DynaPDF.RenderPage, PDFKit.GetPDFPageImage or WinPDF.PageImage to render an image from the PDF first, before loading it.
Examples
Show with and height
Let ( [
$Image = MBS("GMImage.NewFromContainer"; GraphicsMagick::image);
$Width = MBS("GMImage.GetWidth";$Image);
$Height = MBS("GMImage.GetHeight";$Image);
$Error = MBS("GMImage.Release";$Image)
];
$Width & " x " & $Height )
Load from container:
MBS( "GMImage.NewFromContainer"; test::test)
See also
- GMImage.NewImagesFromContainer
- GMImage.ReadContainer
- GMImage.WriteToPDFContainer
- GMImage.WriteToTiffContainer
- ImageView.CreateWithControl
- ImageView.CreateWithSize
- OCR.GetText
- OCR.SetImage
- WinPDF.PageImage
- XL.Book.AddPictureContainer
Release notes
- Version 13.0
- Changed JPEG loader for GMImage.NewFromContainer, GMImage.NewFromFile and related to not stop loading of an image on a warning.
- Version 9.5
- Improved JPEG detection for byte streams, so we can detect if a PNG is actually a JPEG. Now GMImage.NewFromContainer can read JPEG, GIF, PNG, TIFF and BMP even if they are passed in wrong container format.
- Version 9.0
- Improved error handling for GMImage.NewFromContainer, so we pass on error messages from GraphicsMagick.
- Version 8.3
- Fixed GMImage.NewFromContainer to handle SVG files better.
- Version 7.2
- Fixed a bug with GMImage.NewFromContainer where referenced image file would stay open.
Example Databases
- DynaPDF/WMF Conversion
- GraphicsMagick/Annotate Image
- GraphicsMagick/Correct Image Orientation
- GraphicsMagick/Create Multi Tiff
- GraphicsMagick/Export Images
- GraphicsMagick/GraphicsMagick IPTC
- GraphicsMagick/Invert
- GraphicsMagick/Rotate Orientation
- Mac and iOS/ImageView
- Win Only/Window Icon
Blog Entries
- Create thumbnail with GraphicsMagick
- GraphicsMagick in FileMaker, part 24
- GraphicsMagick in FileMaker, part 23
- GraphicsMagick in FileMaker, part 22
- GraphicsMagick in FileMaker, part 19
- GraphicsMagick in FileMaker, part 18
- GraphicsMagick in FileMaker, part 13
- GraphicsMagick in FileMaker, part 10
- GraphicsMagick in FileMaker, part 8
- GraphicsMagick in FileMaker, part 6
FileMaker Magazin
This function checks for a paid license.
Created 18th August 2014, last changed 11st April 2023
