gfm



class  FIBitmap;

FreeImage bitmap wrapper.


this(FreeImage lib, string filename, int flags = 0);

Load an image from file.

Throws
FreeImage on error.

this(FreeImage lib, FIBITMAP* bitmap);

Loads from existing bitmap handle.

Throws
FreeImage on error.

this(FreeImage lib, ubyte* data, int width, int height, int pitch, uint bpp, uint redMask, uint blueMask, uint greenMask, bool topDown = false);

Creates an image from from existing memory data.

Throws
FreeImage on error.

void  save(string filename, int flags = 0);

Saves an image to a file.

Throws
FreeImage on error.

uint  width();

Returns
Width of the image.

uint  height();

Returns
Height of the image.

uint  redMask();

Returns
Red channel bit mask.

uint  greenMask();

Returns
Green channel bit mask.

uint  blueMask();

Returns
Blue channel bit mask.

uint  BPP();

Returns
Bits per pixels.

void*  data();

Returns
A pointer to pixels  data.

uint  pitch();

Returns
Pitch between scanlines in bytes.

void*  scanLine(int y);

Returns
A pointer to scanline y.

FIBitmap  convertTo4Bits();

Converts an image to 4-bits.

Returns
Converted image.

FIBitmap  convertTo8Bits();

Converts an image to 8-bits.

Returns
Converted image.

FIBitmap  convertToGreyscale();

Converts an image to greyscale.

Returns
Converted image.

FIBitmap  convertTo16Bits555();

Converts an image to 16-bits 555.

Returns
Converted image.

FIBitmap  convertTo16Bits565();

Converts an image to 16-bits 565.

Returns
Converted image.

FIBitmap  convertTo24Bits();

Converts an image to 24-bits.

Returns
Converted image.

FIBitmap  convertTo32Bits();

Converts an image to 32-bits.

Throws
FreeImageException on error.
Returns
Converted image.

FIBitmap  convertToType(FREE_IMAGE_TYPE dstType, bool scaleLinear = true);

Converts an image to another format.

Throws
FreeImageException on error.
Returns
Converted image.

FIBitmap  convertToFloat();

Converts an image to float format.

Returns
Converted image.

FIBitmap  convertToRGBF();

Converts an image to RGBF format.

Returns
Converted image.

FIBitmap  convertToUINT16();

Converts an image to UINT16 format.

Returns
Converted image.

FIBitmap  convertToRGB16();

Converts an image to RGB16 format.

Returns
Converted image.

FIBitmap  clone();

Clones an image.

Returns
Cloned image.

FIBitmap  colorQuantize(FREE_IMAGE_QUANTIZE quantize);

Applies color quantization.


FIBitmap  toneMapDrago03(double gamma = 2.2, double exposure = 0.000000);

Applies tone-mapping operator.


FIBitmap  rescale(int dstWidth, int dstHeight, FREE_IMAGE_FILTER filter);

Rescales the image.


void  horizontalFlip();

Flips the image vertically.

Throws
FreeImageException on error.

void  verticalFlip();

Flips the image horizontally.

Throws
FreeImageException on error.

FIBitmap  rotate(double angle, void* bkColor = null);

Rotates the image.

Returns
Rotated image.