Reduces bit depth of an image using the specified reduction method.
Syntax
Parameters
- page
- Image to reduce bit depth.
- colorSpace
- Color space to reduce image to.
- channelDepths
- Channel depths to reduce image to.
- reductionMethod
- Method to use for reducing bit depth.
- options
- Options to use for reduction, or set to null to use defaults.
Example
// Reduce the bit depth of an image to 4 bit
// Create reduction options object and setup a few values for a 16 color 4-bit reduction.
ImGearReductionOptions igReductionOptions = new ImGearReductionOptions();
igReductionOptions.Octree.MaxColors = 16;
igReductionOptions.Octree.FastRemap = false;
igReductionOptions.Octree.ErrorDiffusion = true;
//Apply the reduction using Octree to get a 4-bit index image.
ImGearRasterProcessing.Reduce(igRasterPage, new ImGearColorSpace(ImGearColorSpaceIDs.I),
new int[] { 4 }, ImGearReductionMethods.OCTREE, igReductionOptions);
' Reduce the bit depth of an image to 4 bit
' Create reduction options object and setup a few values for a 16 color 4-bit reduction.
Dim igReductionOptions As New ImGearReductionOptions()
igReductionOptions.Octree.MaxColors = 16
igReductionOptions.Octree.FastRemap = False
igReductionOptions.Octree.ErrorDiffusion = True
'Apply the reduction using Octree to get a 4-bit index image.
ImGearRasterProcessing.Reduce(igRasterPage, New ImGearColorSpace(ImGearColorSpaceIDs.I), New Integer() {4}, _
ImGearReductionMethods.OCTREE, igReductionOptions)
See Also