Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  

GMImage.WriteToTiffContainer

Writes the picture in TIFF format to a container object which you can store in a container field.

Component: GraphicsMagick
Version: 4.4
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "GMImage.WriteToTiffContainer"; ImageRef { ; Filename } )

Parameters

Parameter Description Example value
ImageRef The image reference (a number returned from the GMImage.New functions) 1
Filename Optional
The file name to use for the container. Default is "image.tif"
"ball.tif"

Result

Returns a container value.

Description

Writes the picture in TIFF format to a container object which you can store in a container field.
For preview a JPEG version is included as well as a file name "image.tif" and the image size.
See also GMImage.WriteToFile, GMImage.WriteToJPEGContainer, GMImage.WriteToPNGContainer, GMImage.WriteToBMPContainer and GMImage.WriteToGIFContainer.

Examples

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.Destroy";$Image)

See also


GMImage.WriteToPNGContainer   -   GMImage.XResolution

Feedback: Report problem or ask question.




Links
MBS REAL studio tutorial videos - Nachhilfe in Kruft