All functions   Mac OS X   Windows   Crossplatform   Components   New in version: 1.0   1.1   1.2   1.3   1.4   1.5   1.6   1.7   1.8   2.0  

GMImage.WriteToJPEGContainer

Component: GraphicsMagick
Mac OS X: Works
Windows: Works

MBS( "GMImage.WriteToJPEGContainer"; ImageRef )

Parameters

Parameter Description Example value
ImageRef The image reference (a number returned from the GMImage.New functions) 1

Result

Returns a container value.

Description

Writes the picture in JPEG format to a container object which you can store in a container field.
Includes a file name "image.jpg" and the image size.
For the quality setting use the SetQuality function.

Examples

Recompresses the image with JPEG compressor and a really bad quality:

Let ( [
$Image = MBS("GMImage.NewFromContainer"; GraphicsMagick::image);
$Result = MBS("GMImage.SetQuality";$Image; 5);
$Result = MBS("GMImage.WriteToJPEGContainer"; $Image);
$Error = MBS("GMImage.Destroy";$Image)
];
$Result)

Feedback: Report problem or ask question.