Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Inverts an image.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 8.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
Channel | Which channel to work with. Can be opacity, red, green or blue. The value rgb will apply effect to all three color channels. | "rgb" |
Returns OK or error.
Invert image:
Set Variable [ $image ; Value: MBS( "GMImage.NewFromContainer"; Invert::Input ) ]
# each channel...
// Set Variable [ $r ; Value: MBS( "GMImage.InvertChannel"; $image; "red") ]
// Set Variable [ $r ; Value: MBS( "GMImage.InvertChannel"; $image) ]
// Set Variable [ $r ; Value: MBS( "GMImage.InvertChannel"; $image; "blue") ]
# all channels...
Set Variable [ $r ; Value: MBS( "GMImage.InvertChannel"; $image; "rgb") ]
Set Field [ Invert::Output ; MBS( "GMImage.WriteToPNGContainer"; $image; "output.png") ]
Set Variable [ $r ; Value: MBS( "GMImage.Release"; $image) ]
This function checks for a license.
Created 13th September 2018, last changed 11st November 2019