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:
11.4
11.5
12.0
12.1
12.2
12.3
12.4
12.5
13.0
13.1
Statistic
FMM
Blog
GMImage.WriteToPNGContainer
Writes the picture in PNG format to a container value which you can store in a container field.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 2.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
ImageRef | The image reference number. | 1 | |
Filename | The file name to use for the container. Default is "image.png" | "ball.png" | Optional |
Result
Returns a container value.
Description
Writes the picture in PNG format to a container value which you can store in a container field.For preview a JPEG version is included as well as a file name "image.png" and the image size.
See also GMImage.WriteToFile, GMImage.WriteToJPEGContainer, GMImage.WriteToBMPContainer and GMImage.WriteToGIFContainer.
Some images have bad ICC profile, so saving them will crash (version 3.4 or lower) or return error (3.5 and newer). In this case, please use MBS("GMImage.SetICCColorProfile"; ImageRef; "") to remove the profile.
See Plugin.SetPreviewSize to control size of preview picture.
Examples
Get a container value from the picture in PNG format.
MBS( "GMImage.WriteToPNGContainer"; $MyImageRef; "logo.png" )
Make a barcode and store it as PNG in a container:
Set Variable [$image; Value:MBS( "Barcode.Generate"; "UPCA"; "72527270270")]
If [MBS("Iserror") = 0]
Set Field [MyTable::BarCodeContainer; MBS( "GMImage.WriteToPNGContainer"; $image; "barcode.png" )]
Set Variable [$r; Value:MBS("GMImage.Release"; $image)]
Else
Set Field [MyTable::BarCodeContainer; ""]
End If
Create red square and save to container:
Set Variable [$img; Value:MBS( "GMImage.New"; "16x16"; "red" )]
Set Field [test::test; MBS( "GMImage.WriteToPNGContainer"; $img; "test.png" )]
Set Variable [$r; Value:MBS( "GMImage.Release"; $img)]
See also
- GMImage.Stegano
- GMImage.Transparent
- GMImage.Trim
- GMImage.Unsharpmask
- GMImage.WriteToBMPContainer
- GMImage.WriteToContainer
- GMImage.WriteToFile
- GMImage.WriteToPDFContainer
- Plugin.SetPreviewSize
- Twain.CurrentImage
Example Databases
- Barcode/Swiss QR-Code for invoices/ISO20022 QR v2.0
- GraphicsMagick/Apply Mask
- GraphicsMagick/Find Pixels
- GraphicsMagick/GraphicsMagick Sample
- GraphicsMagick/Image Croping
- GraphicsMagick/Image Scaling
- GraphicsMagick/Picture Text Encoding
- GraphicsMagick/Reduce Image
- Mac and iOS/Machine Learning/Core ML Photos
- Twain/Twain
Blog Entries
- GraphicsMagick in FileMaker, part 24
- GraphicsMagick in FileMaker, part 22
- GraphicsMagick in FileMaker, part 20
- GraphicsMagick in FileMaker, part 3
- Trace with parameter names
- Generate EPC-QR-Code in FileMaker
- What is new in the MBS FileMaker Plugin Version 10.4
- Convert a SVG image to PNG with alpha channel
- Create Barcodes on Server from FileMaker Go
- Gradients in GraphicsMagick
FileMaker Magazin
This function checks for a paid license.
Created 18th August 2014, last changed 24th March 2022
