Meet us at at Real World in Orlando, Florida.
All functions
Mac OS X
Windows
Crossplatform
Components
Guides
New in version:
2.0
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
GMImage.SetType
Component: GraphicsMagick
Version: 2.0
Mac OS X: Works
Windows: Works
MBS( "GMImage.SetType"; ImageRef; type )
Parameters
| 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 |
Result
Returns "OK" on success.
Description
Sets the Image representation type.Chaning the type from TrueColorType to GrayscaleType will convert a color picture to grayscale.
Examples
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.
Links
MBS Real Studio PDF Plugins - Förderverein St. Arnulf Nickenich