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:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
Sets the File type magick identifier (.e.g "GIF")
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 2.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
value | The new value. |
Returns "OK" on success.
Convert image to 1 bit TIFF:
# Load from container
$Image = MBS("GMImage.NewFromContainer"; GraphicsMagick::image);
# make black and white with threshold
$Result = MBS("GMImage.Threshold";$Image; 127);
# mark as monochrome image
$Result = MBS("GMImage.SetMonochrome";$Image; 1);
# set type to 1 for black/white
$Result = MBS("GMImage.SetType";$Image; 1);
# set to use TIFF for compression
$Result = MBS("GMImage.SetMagick";$Image; "TIFF");
# set to use CCITT 4 Fax compression
$Result = MBS("GMImage.SetCompressType";$Image; 4);
# and write to a file
$Result = MBS("GMImage.WriteToFile"; $Image; "/tmp/test.tif");
# cleanup
$Error = MBS("GMImage.Release";$Image)
Created 18th August 2014, last changed 21st December 2018
GMImage.SetLogEventMask - GMImage.SetMatte
Feedback: Report problem or ask question.