AccusoftImagXpress13 ActiveX DLL > ImagXpress Object : DIBGetPalIndex Method |
The palette index within the image.
Valid values are greater than or equal to zero and less than 256. The upper limit is determined by the bit depth and number of colors.
Visual Basic |
---|
Public Function DIBGetPalIndex( _ ByVal IPPalIndex As Integer _ ) As OLE_COLOR |
The palette index within the image.
Valid values are greater than or equal to zero and less than 256. The upper limit is determined by the bit depth and number of colors.
If the current DIB is an 8-bit, 4-bit or 1-bit DIB, the returned value contains the RGB color value in the palette for the given palette index formatted as follows:
BBGGRR
where BB, GG and RR are 8-bit byte values.
thisColor = ImagXpress1.DIBGetPalIndex( 5 ) red = thisColor And 255 green = Int(thisColor / 256) And 255 blue = Int(thisColor / 65536) And 255