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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Writes the picture in TIFF format to a container value which you can store in a container field.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 4.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
ImageRef | The image reference number. | 1 | |
Filename | The file name to use for the container. Default is "image.tif" | "ball.tif" | Optional |
Returns a container value.
Get a container value from the picture in Tiff format.
MBS( "GMImage.WriteToTIFFContainer"; $MyImageRef; "logo.tif" )
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.WriteToTiffContainer"; $Image; "test.tif");
# cleanup
$Error = MBS("GMImage.Release";$Image)
This function checks for a license.
Created 16th October 2014, last changed 24th March 2022