ImageGear for .NET
ImGearReductionOptions Class
Members  Example  See Also  Send Feedback
ImageGear21.Core Assembly > ImageGear.Processing Namespace : ImGearReductionOptions Class




Glossary Item Box

Specifies options for performing color reduction using the ImGearRasterProcessing.Reduce method.

Object Model

ImGearReductionOptions Class

Syntax

 
Visual Basic
C#
Managed Extensions for C++
C++/CLI
 
 

Remarks

The only options used by the ImGearRasterProcessing.Reduce method are the ones which correspond to the type of reduction as specified by the reductionMethod parameter of the ImGearRasterProcessing.Reduce method.

Example

C#Copy Code
// 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);
Visual BasicCopy Code
' 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)

Inheritance Hierarchy

System.Object
   ImageGear.Processing.ImGearReductionOptions

See Also

©2013. Accusoft Corporation. All Rights Reserved.