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.ReadContainer
Read single image frame into current object.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| GraphicsMagick | 10.2 | Yes | Yes | Yes | Yes | Yes |
(old name: GMImage.ReadFromContainer)
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| ImageRef | The image reference number. | 1 | |
| data | The container value, either a variable or a container field. | ||
| Geometry | The rectangle. Geometry is specified as a width and height "100x200". Can be empty. |
Optional | |
| Depth | Color depth parameter. | 0 | Optional |
| Magick | The codec to use to read file. | Optional |
Result
Returns OK or error.
Description
Read single image frame into current object.This allows you to set options before reading in image.
You may want to use GMImage.SetBackgroundColor, GMImage.SetMagick, GMImage.SetFileName or other settings before calling this.
Examples
Convert a SVG image to PNG with alpha channel:
# Load image from container
Set Variable [ $image ; Value: MBS( "GMImage.New"; "500x500"; "transparent" ) ]
# turn on alpha channel and set background to transparent
Set Variable [ $r ; Value: MBS( "GMImage.SetType"; $image; 7 ) ]
Set Variable [ $r ; Value: MBS( "GMImage.SetBackgroundColor"; $Image; "transparent" ) ]
# read SVG
Set Variable [ $r ; Value: MBS( "GMImage.ReadContainer"; $image; SVG to PNG::InputFile; "500x500"; 0; "SVG" ) ]
# Output to container and release image
Set Field [ SVG to PNG::OutputFile ; MBS( "GMImage.WriteToPNGContainer"; $image; "test.png") ]
Set Variable [ $r ; Value: MBS("GMImage.Free"; $image) ]
See also
- GMImage.Free
- GMImage.New
- GMImage.NewFromContainer
- GMImage.PingContainer
- GMImage.SetBackgroundColor
- GMImage.SetFileName
- GMImage.SetMagick
- GMImage.SetType
- GMImage.WriteToContainer
- GMImage.WriteToPNGContainer
Created 7th April 2020, last changed 14th July 2020
GMImage.Read - GMImage.ReduceNoise
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins