ChangeBitDepth()

Description

Changes the bitdepth of a specified image. By doing this, you can change the pixel type of the image.

Syntax

.ChangeBitDepth(sImageIndex, sBitDepth, bHighQuality);

Parameters

<short> sImageIndex: specifies the index of the image to be converted. The index is 0-based.
<short> sBitDepth: specifies the target bit depth.
bool bHighQuality: specifies whether or not to keep high quality while changing the bit depth. When it's true, it takes more time.

Return value

bool

true indicates success. false indicates failure.

Remarks

The allowed bit depths are 1, 4, 8, 24.

When false is returned, check ErrorCode or ErrorString for error information.

Is this page helpful?

Leave a Reply

Your email address will not be published.