FreeImage Documentation

FreeImage Documentation -Contents Previous Next Up

DIB information functions

Subsections


FreeImage_GetColorsUsed

unsigned FreeImage_GetColorsUsed(void *dib);

Retrieves the number of colors used in the bitmap. If the bitmap is non-palletized, 0 is returned.

FreeImage_GetBits

BYTE * FreeImage_GetBits(void *dib);

Returns a pointer to the bitmap bits.

FreeImage_GetScanLine

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

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

FreeImage_GetBPP

unsigned FreeImage_GetBPP(void *dib);

Returns the bitdepth of the bitmap.

FreeImage_GetWidth

unsigned FreeImage_GetWidth(void *dib);

Returns the width of the bitmap in pixels.

FreeImage_GetHeight

unsigned FreeImage_GetHeight(void *dib);

Returns the height of the bitmap in pixels.

FreeImage_GetLine

unsigned FreeImage_GetLine(void *dib);

Returns the width of the bitmap in bytes.

FreeImage_GetPitch

unsigned FreeImage_GetPitch(void *dib);

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

FreeImage_GetDIBSize

unsigned FreeImage_GetDIBSize(void *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(void *dib);

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

FreeImage_WritePaletteEntry

void FreeImage_WritePaletteEntry(void *dib, int entry, int r, int g, int b);

This function is subject to be deleted.

FreeImage_GetInfoHeader

BITMAPINFOHEADER *FreeImage_GetInfoHeader(void *dib);

Returns a pointer to the bitmap's BITMAPINFOHEADER.

FreeImage_GetInfo

BITMAPINFO *FreeImage_GetInfo(void *dib);

Returns a pointer to the bitmap's BITMAPINFO header.

FreeImage_GetColorType

FREE_IMAGE_COLOR_TYPE FreeImage_GetColorType(void *dib);

Investigates the color type of the bitmap and returns one 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

FIC_RGB

24/32-bit RGB

FIC_PALETTE

4/8-bit palletized


Copyright 2000 Floris van den Berg (freeimage@wxs.nl)