Go to the source code of this file.
|
| typedef int(* | getPixelFunction_t) (int x, int y) |
| | This function is used by encodeBitmap for retrieving image data.
|
| |
◆ getPixelFunction_t
| typedef int(* getPixelFunction_t) (int x, int y) |
This function is used by encodeBitmap for retrieving image data.
It must return a gray value between 0 and 255 where 0 is black and 255 is white.
- Parameters
-
| x | The x coordinate of the pixel to get (0 = left) |
| y | The y coordinate of the pixel to get (0 = top) |
Definition at line 32 of file psibitmap.h.
◆ decodeBitmap()
| bool decodeBitmap |
( |
const unsigned char * | p, |
|
|
int & | width, |
|
|
int & | height, |
|
|
BufferStore & | out ) |
|
extern |
Convert a Psion bitmap to a 8bit/pixel grayscale image.
- Parameters
-
| p | Pointer to an input buffer which contains the Psion-formatted bitmap to convert. Must start with a Psion bitmap header. |
| width | On return, the image width in pixels is returned here. |
| height | On return, the image height in pixels is returned here. |
| out | Buffer which gets filled with the raw image data. Each pixel is represented by a byte. The image data is organized in height scanlines of width bytes, starting with the topmost scanline. |
- Returns
- true on success, false if input data is inconsistent.
Definition at line 141 of file psibitmap.cpp.
◆ encodeBitmap()
Convert an image into a bitmap in Psion format.
- Parameters
-
| width | The width of the image to convert. |
| height | The height of the image to convert. |
| getPixel | Pointer to a function for retrieving pixel values. |
| rle | Flag: Perform RLE compression (currently ignored). |
| out | Output buffer; gets filled with the Psion representation of the converted image. |
Definition at line 26 of file psibitmap.cpp.