Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1    Statistic  


Sets whether image supports transparency (matte channel)

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
GraphicsMagick 2.0 Yes Yes Yes Yes Yes

MBS( "GMImage.SetMatte"; ImageRef; flag )


Parameter Description Example value
ImageRef The image reference number. 1
flag A boolean value. 1


Returns "OK" on success.


Sets whether image supports transparency (matte channel)


Removes alpha channel:

MBS("GMImage.SetMatte"; $image; 0)

Adds an alpha channel:

MBS("GMImage.SetMatte"; $image; 1)

Create picture with red and 50% alpha:

#Create picture
Set Variable [$img; Value:MBS( "GMImage.New"; "16x16"; "white")]
#Add alpha channel
Set Variable [$r; Value:MBS( "GMImage.SetMatte"; $img; 1)]
#Set background color and fill
Set Variable [$r; Value:MBS( "GMImage.SetBackgroundColor"; $img; "COLOR 255 0 0 0.5")]
Set Variable [$r; Value:MBS( "GMImage.Erase"; $img)]
#Write to field
Set Variable [$pic; Value:MBS( "GMImage.WriteToPNGContainer"; $img; "test.png" )]
Set Field [test::r; $pic]
Set Variable [$r; Value:MBS( "GMImage.Destroy"; $img)]

See also

Example Databases

GMImage.SetMagick   -   GMImage.SetMatteColor

Feedback: Report problem or ask question.

MBS FileMaker Plugins