Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
GMImage.Flatten
Flatten the alpha channel.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 14.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "GMImage.Flatten"; ImageRef ) More
Parameters
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
Result
Returns OK or error.
Description
Flatten the alpha channel.Please set background color to define what color goes into the transparent areas.
Examples
Removes alpha channel:
# Load from container
Set Variable [ $BigImageRef ; Value: MBS("GMImage.NewFromContainer"; Test::BigImage) ]
# set the color to use for transparent areas
Set Variable [ $Result ; Value: MBS("GMImage.SetBackgroundColor"; $BigImageRef; "white") ]
# and remove transparency
Set Variable [ $Result ; Value: MBS("GMImage.Flatten"; $BigImageRef) ]
# Store output and release the image
Set Field [ Test::Result Test::Result ; MBS( "GMImage.WriteToJPEGContainer"; $BigImageRef ) MBS( "GMImage.WriteToJPEGContainer"; $BigImageRef ) ]
Set Variable [ $Error ; Value: MBS("GMImage.Free";$BigImageRef) ]
See also
- GMImage.FillPattern
- GMImage.Free
- GMImage.New
- GMImage.NewFromContainer
- GMImage.Rotate
- GMImage.SetBackgroundColor
- GMImage.Sharpen
- GMImage.WriteToJPEGContainer
Release notes
- Version 14.2
- Added GMImage.Flatten function to remove alpha channel from image.
Example Databases
Blog Entries
- Neues MBS Plugin 14.2 für Claris FileMaker
- MBS Plugin 14.2 for Claris FileMaker
- MBS FileMaker Plugin, version 14.2pr5
This function checks for a license.
Created 6th May 2024, last changed 12nd June 2024