Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
GMImage.WriteToJPEGContainer
Writes the picture in JPEG format to a container value which you can store in a container field.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| GraphicsMagick | 2.0 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| ImageRef | The image reference number. | 1 | |
| Filename | The file name to use for the container. Default is "image.jpg" | "ball.jpg" | Optional |
Result
Returns a container value.
Description
Writes the picture in JPEG format to a container value 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.Release";$Image)
];
$Result)
Save JPEG image to container as script:
Set Variable [ $Image ; Value: MBS("GMImage.NewFromContainer"; MyTable::BMPContainer) ]
Set Variable [ $r ; Value: MBS("GMImage.SetQuality";$Image; 90) ]
Set Field [ MyTable::JPEGContainer ; MBS("GMImage.WriteToJPEGContainer"; $Image) ]
Set Variable [ $r ; Value: MBS("GMImage.Release";$Image) ]
See also
- GMImage.SetColorFuzz
- GMImage.SetDensity
- GMImage.Solarize
- GMImage.Swirl
- GMImage.Threshold
- GMImage.Trim
- GMImage.WriteToBMPContainer
- GMImage.WriteToGIFContainer
- GMImage.WriteToPDFContainer
- GMImage.WriteToPNGContainer
Example Databases
- GraphicsMagick/Correct Image Orientation
- GraphicsMagick/Reduce Image
- GraphicsMagick/Rotate Orientation
- GraphicsMagick/Trim Picture
Blog Entries
- Correct Image Orientation in FileMaker
- Comparing Base Elements Plugin to MBS FileMaker Plugin
- MBS Filemaker Plugin 2.4 release notes
- MBS Filemaker Plugin, version 2.4pr3
FileMaker Magazin
Created 18th August 2014, last changed 21st December 2018
GMImage.WriteToGIFContainer - GMImage.WriteToPDFContainer
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins