Image

Class represented FIBITMAP.

Constructors

this
this(int width, int height, ImageType type)

Constructor by image size and image type.

this
this(int width, int height, int bpp)

Constructor by image size and bpp.

this
this(FIBITMAP* bitmap)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

bpp
uint bpp()

Returns the size of one pixel in the bitmap in bits. For example when each pixel takes 32-bits of space in the bitmap, this function returns 32. Possible bit depths are 1, 4, 8, 16, 24, 32 for standard bitmaps and 16-, 32-, 48-, 64-, 96- and 128-bit for non standard bitmaps.

channels
uint channels()

Returns how many channels the image has. This is calculated by (bpp) / (1 channel bits). 1 channel bits is estimated by image type.

dataArray
T[] dataArray()

Returns the raw image data as T[].

flipHorizontal
bool flipHorizontal()
Undocumented in source. Be warned that the author may not have intended to support it.
flipVertical
bool flipVertical()
Undocumented in source. Be warned that the author may not have intended to support it.
height
int height()

Returns the height of the bitmap in pixel units.

imageType
ImageType imageType()

Returns the type of the image.

palette
RGBQUAD* palette()
Undocumented in source. Be warned that the author may not have intended to support it.
rawPointer
void* rawPointer()

Returns the raw pointer to the image data for low level API.

save
void save(string path)

Save the image. The extension is estimated by the output path.

saveAsBmp
void saveAsBmp(string path, bool rle)

Save the image as bmp.

saveAsExr
void saveAsExr(string path, bool saveAs32Bit, ExrCompressOption compress)

Save the image as exr.

saveAsJ2k
void saveAsJ2k(string path, int rate)

Save the image as j2k.

saveAsJp2
void saveAsJp2(string path, int rate)

Save the image as jp2.

saveAsJpeg
void saveAsJpeg(string path, int quality, bool progressive, JpegSaveSubsamplingOption subsampling, bool optimize, bool baseline)

Save the image as jpeg.

saveAsPbm
void saveAsPbm(string path, PnmSaveOption option)

Save the image as pbm.

saveAsPgm
void saveAsPgm(string path, PnmSaveOption option)

Save the image as pgm.

saveAsPng
void saveAsPng(string path, PngCompressOption compress, bool interlace)

Save the image as png.

saveAsPpm
void saveAsPpm(string path, PnmSaveOption option)

Save the image as ppm.

saveAsTiff
void saveAsTiff(string path, bool cmyk, TiffCompressOption compress)

Save the image as tiff.

to32bit
Image to32bit()

Converts a bitmap to 32 bits. A clone of the input bitmap is returned for 32-bit bitmaps. For 48-bit RGB images, conversion is done by dividing each 16-bit channel by 256 and by setting the alpha channel to an opaque value (0xFF). For 64-bit RGBA images, conversion is done by dividing each 16-bit channel by 256. A NULL value is returned for other nonstandard bitmap types.

width
int width()

Returns the width of the bitmap in pixel units.

Static functions

load
Image load(string path)

Load image. This function is same as ImageLoader.load.

Meta