|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
In-memory RGBA raster image (Bitmap) with drawing primitives, resizing, BMP file I/O and delta/RLE compression (BitmapUpdate). More...
Go to the source code of this file.
Classes | |
| struct | cmlabs::tagBITMAPFILEHEADER_CM |
| BMP file header (14 bytes), local packed definition so no windows.h dependency is needed. More... | |
| struct | cmlabs::tagBITMAPINFOHEADER_CM |
| BMP info header (40 bytes, BITMAPINFOHEADER equivalent), packed to 2-byte alignment for direct file mapping. More... | |
| struct | cmlabs::tagRGBA |
| One RGBA pixel value as separate byte components. More... | |
| class | cmlabs::Pixel |
| Reference to one pixel: coordinates plus a pointer directly into the owning Bitmap's data (no copy). More... | |
| class | cmlabs::Bitmap |
| 32-bit RGBA raster image with drawing, compositing, scaling, BMP I/O and update-region tracking. More... | |
| class | cmlabs::BitmapUpdate |
| Transportable image update: either a full frame or a compressed (RLE and/or difference) delta against a previous frame. More... | |
Namespaces | |
| namespace | cmlabs |
Macros | |
| #define | GET_RGB_FROM_RGBA(a) |
| #define | GET_R_FROM_RGBA(a) |
| #define | GET_G_FROM_RGBA(a) |
| #define | GET_B_FROM_RGBA(a) |
| #define | GET_RGB_FROM_GRAY(a) |
| #define | GET_RGB_FROM_COMP(r, g, b) |
| #define | GET_GRAY_FROM_RGB(a) |
| #define | GET_DRGB_FROM_2RGBS(a, b) |
| #define | GET_FIRSTRGB_FROM_DRGB(a) |
| #define | GET_SECONDRGB_FROM_DRGB(a) |
| #define | DATACTRL 1 |
| #define | RLECTRL 2 |
| #define | DIFCTRL 3 |
Typedefs | |
| typedef unsigned char | cmlabs::CMBYTE |
| typedef unsigned int | cmlabs::CMUINT |
| typedef unsigned int | cmlabs::CMDWORD |
| typedef unsigned short | cmlabs::CMWORD |
| typedef signed int | cmlabs::CMLONG |
| typedef struct cmlabs::tagBITMAPFILEHEADER_CM | cmlabs::BITMAPFILEHEADER_CM |
| BMP file header (14 bytes), local packed definition so no windows.h dependency is needed. | |
| typedef struct cmlabs::tagBITMAPINFOHEADER_CM | cmlabs::BITMAPINFOHEADER_CM |
| BMP info header (40 bytes, BITMAPINFOHEADER equivalent), packed to 2-byte alignment for direct file mapping. | |
| typedef struct cmlabs::tagRGBA | cmlabs::valRGBA |
| One RGBA pixel value as separate byte components. | |
Functions | |
| char * | cmlabs::ImageResizeDown66 (char *bytesource, uint32 &cols, uint32 &rows) |
| Shrink an RGBA image to 2/3 size (3→2 pixel averaging). | |
| char * | cmlabs::ImageResizeDown (char *bytesource, uint32 &cols, uint32 &rows, uint32 factor) |
| Shrink an RGBA image by an integer factor (box averaging). | |
| char * | cmlabs::ImageResizeUp66 (char *bytesource, uint32 &cols, uint32 &rows) |
| Enlarge an RGBA image to 3/2 size (2→3 pixel interpolation). | |
| char * | cmlabs::ImageResizeUp (char *bytesource, uint32 &cols, uint32 &rows, uint32 factor) |
| Enlarge an RGBA image by an integer factor (pixel replication). | |
In-memory RGBA raster image (Bitmap) with drawing primitives, resizing, BMP file I/O and delta/RLE compression (BitmapUpdate).
Pixels are stored as 32-bit RGBA in a contiguous buffer, row-major from the top-left. The GET_*_FROM_* macros manipulate packed pixel values and assume little-endian byte order (R in the lowest byte), matching the Windows BMP layout used by the file routines. BitmapUpdate carries either a full frame or a compressed difference so remote views can be refreshed incrementally.
Definition in file Bitmap.h.
| #define DATACTRL 1 |
Definition at line 41 of file Bitmap.h.
Referenced by cmlabs::Bitmap::convertBitmapFileDataRunLength(), cmlabs::Bitmap::differenceBitmapFileData(), cmlabs::Bitmap::differenceBitmapFileDataRunLength(), cmlabs::Bitmap::operator-(), cmlabs::Bitmap::runLengthDestructiveEncode(), cmlabs::Bitmap::runLengthEncode(), and cmlabs::Bitmap::updateBitmap().
| #define DIFCTRL 3 |
Definition at line 43 of file Bitmap.h.
Referenced by cmlabs::Bitmap::differenceBitmapFileData(), cmlabs::Bitmap::differenceBitmapFileDataRunLength(), cmlabs::Bitmap::operator-(), and cmlabs::Bitmap::updateBitmap().
| #define GET_B_FROM_RGBA | ( | a | ) |
Definition at line 31 of file Bitmap.h.
Referenced by cmlabs::ImageResizeDown66().
| #define GET_DRGB_FROM_2RGBS | ( | a, | |
| b ) |
Definition at line 37 of file Bitmap.h.
Referenced by cmlabs::Bitmap::runLengthDestructiveEncode().
| #define GET_FIRSTRGB_FROM_DRGB | ( | a | ) |
Definition at line 38 of file Bitmap.h.
Referenced by cmlabs::Bitmap::updateBitmap().
| #define GET_G_FROM_RGBA | ( | a | ) |
Definition at line 30 of file Bitmap.h.
Referenced by cmlabs::ImageResizeDown66().
| #define GET_GRAY_FROM_RGB | ( | a | ) |
Definition at line 34 of file Bitmap.h.
Referenced by cmlabs::Bitmap::getGrayScaleDataCopy().
| #define GET_R_FROM_RGBA | ( | a | ) |
Definition at line 29 of file Bitmap.h.
Referenced by cmlabs::ImageResizeDown66().
| #define GET_RGB_FROM_COMP | ( | r, | |
| g, | |||
| b ) |
| #define GET_RGB_FROM_GRAY | ( | a | ) |
Definition at line 32 of file Bitmap.h.
Referenced by cmlabs::Bitmap::copyGrayScaleData().
| #define GET_RGB_FROM_RGBA | ( | a | ) |
Definition at line 19 of file Bitmap.h.
Referenced by cmlabs::ImageResizeDown66(), cmlabs::ImageResizeUp(), and cmlabs::ImageResizeUp66().
| #define GET_SECONDRGB_FROM_DRGB | ( | a | ) |
Definition at line 39 of file Bitmap.h.
Referenced by cmlabs::Bitmap::updateBitmap().
| #define RLECTRL 2 |
Definition at line 42 of file Bitmap.h.
Referenced by cmlabs::Bitmap::convertBitmapFileDataRunLength(), cmlabs::Bitmap::differenceBitmapFileDataRunLength(), cmlabs::Bitmap::operator-(), cmlabs::Bitmap::runLengthDestructiveEncode(), cmlabs::Bitmap::runLengthEncode(), and cmlabs::Bitmap::updateBitmap().