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.
- Returns
- Width of the image.
- Returns
- Height of the image.
- Returns
- Red channel bit mask.
- Returns
- Green channel bit mask.
- Returns
- Blue channel bit mask.
- Returns
- A pointer to pixels data.
- Returns
- Pitch between scanlines in bytes.
- Returns
- A pointer to scanline y.
Converts an image to 4-bits.
- Returns
- Converted image.
Converts an image to 8-bits.
- Returns
- Converted image.
Converts an image to greyscale.
- Returns
- Converted image.
Converts an image to 16-bits 555.
- Returns
- Converted image.
Converts an image to 16-bits 565.
- Returns
- Converted image.
Converts an image to 24-bits.
- Returns
- Converted image.
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.
Converts an image to float format.
- Returns
- Converted image.
Converts an image to RGBF format.
- Returns
- Converted image.
Converts an image to UINT16 format.
- Returns
- Converted image.
Converts an image to RGB16 format.
- Returns
- Converted image.
Clones an image.
- Returns
- Cloned image.
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);
Flips the image vertically.
- Throws
- FreeImageException on error.
Flips the image horizontally.
- Throws
- FreeImageException on error.
FIBitmap rotate(double angle, void* bkColor = null);
Rotates the image.
- Returns
- Rotated image.