Click or drag to resize

ImageFileGetPalette Method

This property is used to get or set the palette of an 8-bit page in the image file object.

Namespace:  Kofax.OmniPageCSDK.IproPlus
Assembly:  Kofax.OmniPageCSDK.IproPlus (in Kofax.OmniPageCSDK.IproPlus.dll) Version: 1.0.0.0
Syntax
public Object GetPalette(
	[OptionalAttribute] int Page
)

Parameters

Page (Optional)
Type: SystemInt32

Return Value

Type: Object
Remarks

This property is a Variant containing a SAFEARRAY of Bytes for (C++), or a Byte array (Visual Basic). The array is 768 bytes long (256 color triplets, in RGB order).

If this property is set to an empty Variant or the passed array has no elements, the page clears the palette information so that it is handled as an 8-bit, grayscale image (no image conversion is done, a default grayscale palette will be assumed for all subsequent image processing algorithms). Similarly if the page does not have a palette, an empty Variant or array is returned. If the page is not an 8-bit image, this property is empty and altering it has no effect. For multi-page images, use the optional Page parameter to identify the page index to be queried.

This method can only be used with multi-page image TIFF files. A further requirement is that the pages in the multi-page TIFF file must be stored in one-strip format and the StripBytesCount TIFF tag must exist in the page header. TIFF image files created by the Capture SDK fulfill this requirement.

See Also