![]() |
![]() |
![]() |
| HOME | DOWNLOAD | DOCS | DEVELOPMENT | LICENSE | CREDITS |
Reads / writes Microsoft Windows Bitmap files. More...
#include <iBMP.h>
Classes | |
| struct | BITMAPCOREHEADER |
| Bitmap Core Header (Microsoft Windows 2.x) | |
| struct | BITMAPFILEHEADER |
| Bitmap File Header. | |
| struct | BITMAPINFOHEADER |
| Bitmap Info Header (Microsoft Windows 3.x) | |
| struct | BITMAPV4HEADER |
| Bitmap Version 4 Header (Microsoft Windows 95) | |
| struct | BITMAPV5HEADER |
| Bitmap Version 5 Header (Microsoft Windows 98+) | |
Public Types | |
| enum | BMPCompressFmt { BI_RGB = 0, BI_RLE8 = 1, BI_RLE4 = 2, BI_BITFIELDS = 3, BI_JPEG = 4, BI_PNG = 5 } |
| enum | BMPRenderingIntent { RI_COLORIMETRIC = 0, RI_BUSINESS = 1, RI_GRAPHICS = 2, RI_IMAGES = 3 } |
| enum | BMPColorSpace { CS_CALIBRATED_RGB = 0, CS_sRGB = 1, CS_CMYK = 2 } |
Public Member Functions | |
| iBMP () | |
| Constructs a null image. | |
| iBMP (const iBMP &img) | |
| Copy constructor. | |
| iBMP (const iAbstractImage &img) | |
| iAbstractImage copy constructor. | |
| iBMP (int w, int h, iImageFormat f) | |
| Constructs an image with the given size and format. | |
| iBMP (Iubyte *d, int w, int h, iImageFormat f, int b) | |
| Constructs an image using an existing memory buffer. | |
| iBMP (const char *filename) | |
| Loads a BMP image file from disk. | |
| iBMP (Iubyte *buf, int len) | |
| Loads a BMP image from an existing memory buffer. | |
| iBMP (iDataStream *s) | |
| Loads a BMP image using an existing data stream. | |
| ~iBMP () | |
| Destructor. | |
| void | clear () |
| Detaches this image from the image data and resets all data members to their initial values. | |
| bool | isFormatSupported (iImageFormat fmt) const |
| Checks whether or not a given image color format is supported by this image type. | |
| iBMP & | operator= (const iBMP &img) |
| iBMP & | operator= (const iAbstractImage &img) |
Static Public Member Functions | |
| static bool | isValid (iDataStream *s) |
Protected Member Functions | |
| void | init () |
| bool | loadImage () |
| bool | saveImage () |
Reads / writes Microsoft Windows Bitmap files.
Extensions:
.bmp and .dib
Image types:
Indexed and truecolor
Pixel Depths:
1-bit, 4-bit, 8-bit, 16-bit, 24-bit, and 32-bit
TODO:
Read/write 1-bit and 4-bit images.
Read/write support for all compression types.
This class focuses on the Microsoft Windows Bitmap file and does not have any specific support for OS/2 bitmaps, although it might be able to read some of them.
Constructs a null image.
| imagen::iBMP::iBMP | ( | const iBMP & | img | ) |
Copy constructor.
This copies all image attributes, and attaches itself to img's shared data.
| imagen::iBMP::iBMP | ( | const iAbstractImage & | img | ) |
iAbstractImage copy constructor.
| imagen::iBMP::iBMP | ( | int | w, |
| int | h, | ||
| iImageFormat | f | ||
| ) |
Constructs an image with the given size and format.
The image data will be allocated, but not initialized.
| w | : Image width. |
| h | : Image height. |
| f | : Image format. |
| imagen::iBMP::iBMP | ( | Iubyte * | d, |
| int | w, | ||
| int | h, | ||
| iImageFormat | f, | ||
| int | b | ||
| ) |
Constructs an image using an existing memory buffer.
The memory buffer will not be deleted at destruction.
| imagen::iBMP::iBMP | ( | const char * | filename | ) |
Loads a BMP image file from disk.
| imagen::iBMP::iBMP | ( | Iubyte * | buf, |
| int | len | ||
| ) |
Loads a BMP image from an existing memory buffer.
| imagen::iBMP::iBMP | ( | iDataStream * | s | ) |
Loads a BMP image using an existing data stream.
Destructor.
| void imagen::iBMP::clear | ( | ) | [virtual] |
Detaches this image from the image data and resets all data members to their initial values.
Reimplemented from imagen::iAbstractImage.
| bool imagen::iBMP::isFormatSupported | ( | iImageFormat | fmt | ) | const [virtual] |
Checks whether or not a given image color format is supported by this image type.
Implements imagen::iAbstractImage.
| static bool imagen::iBMP::isValid | ( | iDataStream * | s | ) | [static] |
| iBMP& imagen::iBMP::operator= | ( | const iAbstractImage & | img | ) |
Reimplemented from imagen::iAbstractImage.
| void imagen::iBMP::init | ( | ) | [protected] |
Reimplemented from imagen::iAbstractImage.
| bool imagen::iBMP::loadImage | ( | ) | [protected, virtual] |
Implements imagen::iAbstractImage.
| bool imagen::iBMP::saveImage | ( | ) | [protected, virtual] |
Implements imagen::iAbstractImage.
API Documentation by Mark D. Procarione |
Generated by
![]() |