Function pdfium_render::bindgen::FPDFBitmap_Create
source · [−]pub unsafe extern "C" fn FPDFBitmap_Create(
width: c_int,
height: c_int,
alpha: c_int
) -> FPDF_BITMAPExpand description
Function: FPDFBitmap_Create Create a device independent bitmap (FXDIB). Parameters: width - The number of pixels in width for the bitmap. Must be greater than 0. height - The number of pixels in height for the bitmap. Must be greater than 0. alpha - A flag indicating whether the alpha channel is used. Non-zero for using alpha, zero for not using. Return value: The created bitmap handle, or NULL if a parameter error or out of memory. Comments: The bitmap always uses 4 bytes per pixel. The first byte is always double word aligned.
The byte order is BGRx (the last byte unused if no alpha channel) or
BGRA.
The pixels in a horizontal line are stored side by side, with the
left most pixel stored first (with lower memory address).
Each line uses width * 4 bytes.
Lines are stored one after another, with the top most line stored
first. There is no gap between adjacent lines.
This function allocates enough memory for holding all pixels in the
bitmap, but it doesn't initialize the buffer. Applications can use
FPDFBitmap_FillRect() to fill the bitmap using any color. If the OS
allows it, this function can allocate up to 4 GB of memory.