Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
GMImage.Release
Releases the image from memory.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 2.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "GMImage.Release"; ImageRef ) More
(old name: GMImage.Destroy)
Parameters
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
Result
Returns OK or error.
Description
Releases the image from memory.Please call this function when you are done with the image to free memory.
The plugin doesn't know whether you need the image later, so it can't free the memory for you.
You can use GMImage.ImageCount to find out how many images are open in memory.
Used to be named GMImage.Release before.
You need to release all image references returned by functions GMImage.New, GMImage.NewFromBase64, GMImage.NewFromContainer, GMImage.NewFromFile, GMImage.NewFromHex, GMImage.NewImagesFromContainer, GMImage.NewImagesFromFile, GMImage.Copy, GMImage.GetClipMask, MenuItem.GetImage, MenuItem.GetMixedStateImage, MenuItem.GetOffStateImage, MenuItem.GetOnStateImage, Twain.CurrentImage, and Barcode.Generate.
Examples
Show with and height
Let ( [
$Image = MBS("GMImage.NewFromContainer"; GraphicsMagick::image);
$Width = MBS("GMImage.GetWidth";$Image);
$Height = MBS("GMImage.GetHeight";$Image);
$Error = MBS("GMImage.Destroy";$Image)
];
$Width & " x " & $Height )
Create red square and save to container:
Set Variable [$img; Value:MBS( "GMImage.New"; "16x16"; "red" )]
Set Field [test::test; MBS( "GMImage.WriteToPNGContainer"; $img; "test.png" )]
Set Variable [$r; Value:MBS( "GMImage.Destroy"; $img)]
See also
- GMImage.Negate
- GMImage.Repage
- GMImage.Resize
- MenuItem.GetOffStateImage
- MenuItem.GetOnStateImage
- OCR.GetText
- OCR.GetTextWithCoordinates
- Twain.CurrentImage
- XL.Book.AddPictureContainer
- XL.Sheet.SetPictureWithSize
Release notes
- Version 9.0
- Renamed GMImage.Destroy to GMImage.Release. Old name stays valid.
Example Databases
- Barcode/Barcodes from Invoices
- Barcode/Swiss QR-Code for invoices/Swiss QR-Code for invoices ISO 20022
- Containers/Create Container Preview
- DynaPDF/Scan with WIA to PDF
- GraphicsMagick/Image Scaling
- GraphicsMagick/Pick color from image via Screenshot
Blog Entries
- Tips and tricks with MBS
- Create thumbnail with GraphicsMagick
- GraphicsMagick in FileMaker, part 23
- GraphicsMagick in FileMaker, part 7
- GraphicsMagick in FileMaker, part 6
- GraphicsMagick in FileMaker, part 5
- GraphicsMagick in FileMaker, part 4
- GraphicsMagick in FileMaker, part 3
- GraphicsMagick in FileMaker, part 1
- Trace with parameter names
FileMaker Magazin
This function checks for a license.
Created 18th August 2014, last changed 12nd June 2020