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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
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 | FileMaker 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.
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.Sharpen
- GMImage.Stegano
- GMImage.Threshold
- GMImage.Transparent
- GMImage.Trim
- GMImage.WriteToBMPContainer
- GMImage.WriteToContainer
- GMImage.WriteToPDFContainer
- IsError
- Twain.CurrentImage
Example Databases
- Barcode/Swiss QR-Code for invoices ISO 20022
- Drag and Drop/for Mac/Image drag from one database to other/Image drop
- GraphicsMagick/Colors
- GraphicsMagick/Drawing
- GraphicsMagick/GraphicsMagick Path Drawing
- GraphicsMagick/Image Croping
- GraphicsMagick/Invert
- GraphicsMagick/Picture Text Encoding
- GraphicsMagick/SVG to PNG
- GraphicsMagick/Trim Picture Border
Blog Entries
- 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
- Neue Funktionen des MBS FileMaker Plugin 9.4
- Gradients in GraphicsMagick
- Circle crop images in FileMaker with MBS Plugin
- QR Codes for Invoices in Switzerland
- Face detection via CoreImage in FileMaker
- MBS Filemaker Plugin 2.4 release notes
- MBS Filemaker Plugin, version 2.4pr3
FileMaker Magazin
- Ausgabe 6/2020, Seite 38
- Ausgabe 5/2018, Seite 29, PDF
- Ausgabe 5/2018, Seite 26, PDF
- Ausgabe 5/2011, Seite 33, PDF
Created 18th August 2014, last changed 21st December 2018
GMImage.WriteToPDFContainer - GMImage.WriteToTiffContainer
Feedback: Report problem or ask question.
Links
MBS Xojo tutorial videos