Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
GMImage.SetDepth
Sets the Image depth (bits allocated to red/green/blue components)
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
GraphicsMagick | 2.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "GMImage.SetDepth"; ImageRef; depth ) More
Parameters
Parameter | Description | Example |
---|---|---|
ImageRef | The image reference number. | 1 |
depth | The bit depth. | 8 |
Result
Returns "OK" on success.
Description
Sets the Image depth (bits allocated to red/green/blue components)See also
- Barcode.Generate
- GMImage.GetDebug
- GMImage.GetDepth
- GMImage.GetWidth
- GMImage.Segment
- GMImage.SetDebug
- GMImage.SetDensity
- GMImage.SetFont
- GMImage.SetMatte
- GMImage.SetType
Release notes
- Version 11.0
- Changed Barcode.Generate to default to 8-bit per channel for the generated image to avoid trouble if receiving software can't handle 16 bit per channel. You can still change with GMImage.SetDepth, e.g. to make a monochrome version.
Blog Entries
This function checks for a license.
Created 18th August 2014, last changed 18th August 2014