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.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Read single image frame into current object.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 10.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
(old name: GMImage.ReadFromContainer)
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 |
Returns OK or error.
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) ]
Created 7th April 2020, last changed 14th July 2020
GMImage.Read - GMImage.ReduceNoise
Feedback: Report problem or ask question.