Specifications

Intel
®
Image Processing Library Reference Manual
4-50
4
Return Value
The constructed IplImage.Ifnomemoryisavailableinthesystemto
allocate the
IplImage header or image data, NULL value is returned.
ConvertFromDIB
Converts a DIB image to
an
IplImage
with
specified attributes.
void iplConvertFromDIB(BITMAPINFOHEADER*
dib
,
IplImage*
image
)
dib
The input DIB image.
image
The IplImage header with specified attributes. If
the data pointer is NULL, image data memory will
be allocated and the pointer set to it.
Discussion
The function iplConvertFromDIB() converts DIB images to Image
Processing Library images according to the attributes set in the IplImage
header; see Example 4-9. If the image data pointer is NULL and there is no
memory to allocate the converted image data, the conversion will be
interrupted and the function will return a
NULL pointer.
The following constraints apply to the conversion:
The bit depth per channel of the
IplImage should be greater than or
equal to that of the DIB image.
The number of channels (not including the alpha channel) in the
IplImage should be greater than or equal to the number of channels in
the DIB image (not including the alpha channel if present).