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

GMImage.WriteToJPEGContainer

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

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

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

Parameters

Parameter Description Example value
ImageRef The image reference number. 1
Filename Optional
The file name to use for the container. Default is "image.jpg"
"ball.jpg"

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 GMImage.SetQuality function.
For most cases the PNG file format is the better choice as it supports transparency and lossless compression.
See also GMImage.WriteToFile, GMImage.WriteToPNGContainer, GMImage.WriteToTiffContainer, GMImage.WriteToBMPContainer and GMImage.WriteToGIFContainer.

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)

See also


GMImage.WriteToGIFContainer   -   GMImage.WriteToPNGContainer

Feedback: Report problem or ask question.




Links
MBS Real Studio Plugins - Pfarrgemeinde St. Arnulf Nickenich