Specifications
Image Creation and Access
4-55
4
IPL_PALCONV_POPULATE The popularity palette
conversion algorithm is used.
IPL_PALCONV_MEDCUT The median cut algorithm for
palette conversion is used.
Discussion
The function iplConvertToDIB() converts an IplImage to a DIB image.
The conversion takes place according to the source and destination image
attributes. While
IplImage format always uses absolute color, DIB images
can be in absolute or palette color. When the DIB is a palette image, the
absolute color
IplImage is converted to a palette image according to the
palette conversion option specified. When the bit depth of an absolute
color DIB image is less than that of the
IplImage, then dithering according
to the specified option is performed.
The following constraints apply when using this function:
• The number of channels in the
IplImage should be equal to the
number of channels in the DIB image.
• The alpha channel in an
IplImage will be passed on only when the
DIB is an RGBA image.
ConvertToDIBSep
Converts an
IplImage
to a
DIB image, with DIB header
and data stored separately.
IPLStatus iplConvertToDIBSep(iplImage*
image
,
BITMAPINFOHEADER*
dib
, char*
dibData
, int
dither
,
int
paletteConversion
)
image
The input IplImage.
dib
The output DIB image header.