re_bmp2image()

extern ReImageHandle XXX_API re_bmp2image
  (const void *bmp_buffer, const void *bmp_bits, ReImage *image);
      

Parameter:

bmp_buffer
Address of the source bitmap image BITMAPINFOHEADER.
bmp_bits
Memory of the pixel when not NULL.
image
Address of a structure for recording the result.

Return value:

Handle of the allocated memory, NULL in case of error.

Comment:

The source bitmap image BITMAPINFOHEADER under bmp_buffer will be converted into the ReImage format. Is bmp_bits = NULL, the image pixels have to be attached to the BITMAPINFOHEADER as follows:

(char*)bmp_buffer + (BITMAPINFOHEADER*)bmp_buffer->biSize + (BITMAPINFOHEADER*)bmp_buffer->biClrUsed * sizeof(RGBQUAD)

The function allocates sufficient memory for the destination image. In case of error the NULL pointer will be returned, the error text can be retrieved with re_GetErrorText(). In case of success a handle of the allocated memory will be returned. This memory can be freed by a call to re_freeimage() with the given handle.

Reference: