|
plptools
|
#include "bufferstore.h"

Go to the source code of this file.
Typedefs | |
| typedef int(* | getPixelFunction_t) (int x, int y) |
| This function is used by encodeBitmap for retrieving image data. More... | |
Functions | |
| void | encodeBitmap (int width, int height, getPixelFunction_t getPixel, bool rle, bufferStore &out) |
| Convert an image into a bitmap in Psion format. More... | |
| bool | decodeBitmap (const unsigned char *p, int &width, int &height, bufferStore &out) |
| Convert a Psion bitmap to a 8bit/pixel grayscale image. More... | |
| 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.
| 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 34 of file psibitmap.h.
| bool decodeBitmap | ( | const unsigned char * | p, |
| int & | width, | ||
| int & | height, | ||
| bufferStore & | out | ||
| ) |
Convert a Psion bitmap to a 8bit/pixel grayscale image.
| 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. |
Definition at line 141 of file psibitmap.cpp.
| void encodeBitmap | ( | int | width, |
| int | height, | ||
| getPixelFunction_t | getPixel, | ||
| bool | rle, | ||
| bufferStore & | out | ||
| ) |
Convert an image into a bitmap in Psion format.
| 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.