Leptonica  1.54
Файл src/bmpio.c
#include <string.h>
#include "allheaders.h"
#include "bmp.h"

Макросы

#define DEBUG   0

Функции

PIXpixReadStreamBmp (FILE *fp)
l_int32 pixWriteStreamBmp (FILE *fp, PIX *pix)
PIXpixReadMemBmp (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)

pixReadStreamBmp()

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 
)

pixWriteStreamBmp()

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.


Переменные

RGBA_QUAD bwmap[2] = { {255,255,255,0}, {0,0,0,0} }