All functions Mac OS X Windows Crossplatform Components New in version: 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 2.0
Component: GraphicsMagick
Mac OS X: Works
Windows: Works
MBS( "GMImage.SetType"; ImageRef; type )
Parameter | Description | Example value |
---|---|---|
ImageRef | The image reference (a number returned from the GMImage.New functions) | 1 |
type | UndefinedType = 0, BilevelType = 1, GrayscaleType = 2, GrayscaleMatteType = 3, PaletteType = 4, PaletteMatteType = 5, TrueColorType = 6, TrueColorMatteType = 7, ColorSeparationType = 8, ColorSeparationMatteType = 9, OptimizeType = 10 | 6 |
Returns "OK" on success.
Sets the Image representation type.
Chaning the type from TrueColorType to GrayscaleType will convert a color picture to grayscale.
Change the picture to grayscale.
Let ( [
$Image = MBS("GMImage.NewFromContainer"; GraphicsMagick::image);
$Result = MBS("GMImage.SetType";$Image; 2);
$Result = MBS("GMImage.WriteToPNGContainer"; $Image);
$Error = MBS("GMImage.Destroy";$Image)
];
$Result)
Feedback: Report problem or ask question.