ImageMan ActiveX Control Version 8
ReduceTo Method
See Also  Example  Send comments on this topic.
nColors
The number of colors desired
GreyScale
True if the resulting image should use a grayscale palette.
OptimizedPalette
If True and GrayScale is False then an optimized palette will be generated.

Glossary Item Box

Description

Reduces the color depth of the image to the specified number of colors.

Syntax

Visual Basic
Public Sub ReduceTo( _
   ByVal nColors As Integer, _
   ByVal GreyScale As Boolean, _
   ByVal OptimizedPalette As Boolean _
) 

Parameters

nColors
The number of colors desired
GreyScale
True if the resulting image should use a grayscale palette.
OptimizedPalette
If True and GrayScale is False then an optimized palette will be generated.

Example

(Visual Basic)Copy Code
' Convert an image to a 256-color image with an optimized palette
ImageControl1.ReduceTo 256, False, True

'Convert an Image to 16 color Grayscale
' In this case the bOptimizedPalette parameter is ignored since its is not applicable
ImageControl1.ReduceTo 16, True, False

See Also

© 2014 Data Techniques Inc. All Rights Reserved.