Leptonica
1.54
|
Макросы | |
#define | DEBUG 0 |
Функции | |
PIX * | pixReadStreamBmp (FILE *fp) |
l_int32 | pixWriteStreamBmp (FILE *fp, PIX *pix) |
PIX * | pixReadMemBmp (const l_uint8 *cdata, size_t size) |
l_int32 | pixWriteMemBmp (l_uint8 **pdata, size_t *psize, PIX *pix) |
Переменные | |
RGBA_QUAD | bwmap [2] = { {255,255,255,0}, {0,0,0,0} } |
#define DEBUG 0 |
PIX* pixReadMemBmp | ( | const l_uint8 * | cdata, |
size_t | size | ||
) |
PIX* pixReadStreamBmp | ( | FILE * | fp | ) |
Input: stream opened for read Return: pix, or null on error
Notes: (1) Here are references on the bmp file format: http://en.wikipedia.org/wiki/BMP_file_format http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html
l_int32 pixWriteMemBmp | ( | l_uint8 ** | pdata, |
size_t * | psize, | ||
PIX * | pix | ||
) |
l_int32 pixWriteStreamBmp | ( | FILE * | fp, |
PIX * | pix | ||
) |
Input: stream opened for write pix (1, 4, 8, 32 bpp) Return: 0 if OK, 1 on error
Notes: (1) We position fp at the beginning of the stream, so it truncates any existing data (2) 2 bpp Bmp files are apparently not valid!. We can write and read them, but nobody else can read ours.