Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples
New in version: 9.0   9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3    Statistic  


Sets the JPEG/MIFF/PNG compression level (default 75).

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
GraphicsMagick 2.0 Yes Yes Yes Yes Yes
MBS( "GMImage.SetQuality"; ImageRef; quality )   More


Parameter Description Example value
ImageRef The image reference number. 1
quality a number in range of 0 to 100. 75


Returns "OK" on success.


Sets the JPEG/MIFF/PNG compression level (default 75).


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

Converts to JPEG with 90% compression:

Set Variable [$ImageRef; Value:MBS("GMImage.NewFromContainer"; Test::BigImage)]
Set Variable [$Result; Value:MBS("GMImage.SetQuality"; $ImageRef; 90)]
Set Field [Test::Result; MBS( "GMImage.WriteToJPEGContainer"; $ImageRef )]
Set Variable [$Error; Value:MBS("GMImage.Release";$ImageRef)]

See also

Example Databases

Blog Entries

FileMaker Magazin

Created 18th August 2014, last changed 21st December 2018

GMImage.SetProfile   -   GMImage.SetQuantizeColorSpace

Feedback: Report problem or ask question.

MBS Xojo blog