Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
GMImage.SetQuality
Sets the JPEG/MIFF/PNG compression level (default 75).
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 2.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
Quality | a number in range of 0 to 100. | 75 |
Result
Returns "OK" on success.
Description
Sets the JPEG/MIFF/PNG compression level (default 75).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.Release";$Image)
];
$Result)
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
- DynaPDF.SetJPEGQuality
- GMImage.GetDensity
- GMImage.GetQuality
- GMImage.New
- GMImage.NewFromContainer
- GMImage.Release
- GMImage.Scale
- GMImage.SetProfile
- GMImage.SetQuiet
- GMImage.Stegano
Example Databases
- GraphicsMagick/Combine Pictures
- GraphicsMagick/GraphicsMagick Sample
- GraphicsMagick/Image Scaling
- GraphicsMagick/Reduce Image
Blog Entries
FileMaker Magazin
This function checks for a license.
Created 18th August 2014, last changed 21st December 2018
