DIB information functions

Subsections

FreeImage_GetColorsUsed

unsigned FreeImage_GetColorsUsed(FIBITMAP *dib);

Retrieves the number of colours used in the bitmap. If the bitmap is non-palletised, 0 is returned.

FreeImage_GetBits

BYTE * FreeImage_GetBits(FIBITMAP *dib);

Returns a pointer to the bitmap bits.

FreeImage_GetBitsRowCol

BYTE * FreeImage_GetBitsRowCol(FIBITMAP *dib, int col, int row);

Returns a pointer to the bitmap bits on the given column and row.

FreeImage_GetScanLine

BYTE * FreeImage_GetScanLine(FIBITMAP *dib, int scanline);

Returns a pointer to the beginning of the bits of the given scanline.

FreeImage_GetBPP

unsigned FreeImage_GetBPP(FIBITMAP *dib);

Returns the bitdepth of the bitmap.

FreeImage_GetWidth

unsigned FreeImage_GetWidth(FIBITMAP *dib);

Returns the width of the bitmap in pixels.

FreeImage_GetHeight

unsigned FreeImage_GetHeight(FIBITMAP *dib);

Returns the height of the bitmap in pixels.

FreeImage_GetLine

unsigned FreeImage_GetLine(FIBITMAP *dib);

Returns the width of the bitmap in bytes.

FreeImage_GetPitch

unsigned FreeImage_GetPitch(FIBITMAP *dib);

Returns the width of the bitmap in bytes rounded to the nearest DWORD.

FreeImage_GetDIBSize

unsigned FreeImage_GetDIBSize(FIBITMAP *dib);

Returns the size of the bitmap in bytes. The size of the bitmap is the BITMAPINFOHEADER + the size of the palette + the size of the bitmap data.

FreeImage_GetPalette

RGBQUAD *FreeImage_GetPalette(FIBITMAP *dib);

Returns a pointer to the bitmap's palette. If the bitmap doesn't have a palette, FreeImage_GetPalette returns NULL.

FreeImage_GetInfoHeader

BITMAPINFOHEADER *FreeImage_GetInfoHeader(FIBITMAP *dib);

Returns a pointer to the bitmap's BITMAPINFOHEADER.

FreeImage_GetInfo

BITMAPINFO *FreeImage_GetInfo(FIBITMAP *dib);

Returns a pointer to the bitmap's BITMAPINFO header.

FreeImage_GetColorType

FREE_IMAGE_COLOR_TYPE FreeImage_GetColorType(FIBITMAP *dib);

Investigates the colour type of the bitmap and returns one of the following values:

Value Description
FIC_MINISWHITE 1-bit bitmap. The min value is white
FIC_MINISBLACK 1-bit bitmap. The min value is black 8-bit grayscale. The min value is black
FIC_RGB 24/32-bit RGB
FIC_PALETTE 1/4/8-bit palletised