Leptonica 1.68
C Image Processing Library

bmpio.c File Reference

Read/write bmp format, from/to file and memory. More...

#include <string.h>
#include "allheaders.h"
#include "bmp.h"

Go to the source code of this file.

Defines

#define DEBUG   0

Functions

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)

Variables

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

Detailed Description

Read/write bmp format, from/to file and memory.

    Read bmp from file
         PIX          *pixReadStreamBmp()

    Write bmp to file
         l_int32       pixWriteStreamBmp()

    Read/write to memory   [only on linux]
         PIX          *pixReadMemBmp()
         l_int32       pixWriteMemBmp()

Definition in file bmpio.c.


Define Documentation

#define DEBUG   0

Definition at line 41 of file bmpio.c.


Function Documentation

l_int32 pixWriteStreamBmp ( FILE *  fp,
PIX pix 
)
PIX* pixReadMemBmp ( const l_uint8 cdata,
size_t  size 
)

Definition at line 586 of file bmpio.c.

References ERROR_PTR, and NULL.

Referenced by pixReadHeaderMem(), and pixReadMem().

l_int32 pixWriteMemBmp ( l_uint8 **  pdata,
size_t *  psize,
PIX pix 
)

Definition at line 596 of file bmpio.c.

References ERROR_INT.

Referenced by pixWriteMem().


Variable Documentation

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

Definition at line 38 of file bmpio.c.

Referenced by pixWriteStreamBmp().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines