Leptonica 1.68
C Image Processing Library

ioformats_reg.c File Reference

This is the primary Leptonica regression test for lossless read/write I/O to standard image files (png, tiff, bmp, etc.) More...

#include "allheaders.h"

Go to the source code of this file.

Defines

#define BMP_FILE   "test1.bmp"
#define FILE_1BPP   "feyn.tif"
#define FILE_2BPP   "speckle2.png"
#define FILE_2BPP_C   "weasel2.4g.png"
#define FILE_4BPP   "speckle4.png"
#define FILE_4BPP_C   "weasel4.16c.png"
#define FILE_8BPP_1   "dreyfus8.png"
#define FILE_8BPP_2   "weasel8.240c.png"
#define FILE_8BPP_3   "test8.jpg"
#define FILE_16BPP   "test16.tif"
#define FILE_32BPP   "marge.jpg"

Functions

static l_int32 testcomp (const char *filename, PIX *pix, l_int32 comptype)
static l_int32 testcomp_mem (PIX *pixs, PIX **ppixt, l_int32 index, l_int32 format)
static l_int32 test_writemem (PIX *pixs, l_int32 format, char *psfile)
static PIXmake_24_bpp_pix (PIX *pixs)
static l_int32 get_header_data (const char *filename, l_int32 true_format)
static void get_tiff_compression_name (char *buf, l_int32 format)
 main (int argc, char **argv)

Variables

LEPT_DLL const char * ImageFileFormatExtensions []

Detailed Description

This is the primary Leptonica regression test for lossless read/write I/O to standard image files (png, tiff, bmp, etc.)

Definition in file ioformats_reg.c.


Define Documentation

#define BMP_FILE   "test1.bmp"

Definition at line 57 of file ioformats_reg.c.

Referenced by main().

#define FILE_1BPP   "feyn.tif"

Definition at line 58 of file ioformats_reg.c.

Referenced by main().

#define FILE_2BPP   "speckle2.png"

Definition at line 59 of file ioformats_reg.c.

Referenced by main().

#define FILE_2BPP_C   "weasel2.4g.png"

Definition at line 60 of file ioformats_reg.c.

Referenced by main().

#define FILE_4BPP   "speckle4.png"

Definition at line 61 of file ioformats_reg.c.

Referenced by main().

#define FILE_4BPP_C   "weasel4.16c.png"

Definition at line 62 of file ioformats_reg.c.

Referenced by main().

#define FILE_8BPP_1   "dreyfus8.png"

Definition at line 63 of file ioformats_reg.c.

Referenced by main().

#define FILE_8BPP_2   "weasel8.240c.png"

Definition at line 64 of file ioformats_reg.c.

Referenced by main().

#define FILE_8BPP_3   "test8.jpg"

Definition at line 65 of file ioformats_reg.c.

Referenced by main().

#define FILE_16BPP   "test16.tif"

Definition at line 66 of file ioformats_reg.c.

Referenced by main().

#define FILE_32BPP   "marge.jpg"

Definition at line 67 of file ioformats_reg.c.

Referenced by main().


Function Documentation

static l_int32 testcomp ( const char *  filename,
PIX pix,
l_int32  comptype 
) [static]

Definition at line 464 of file ioformats_reg.c.

References FALSE, findFileFormatStream(), lept_fclose(), lept_fopen(), pixDestroy(), pixEqual(), pixRead(), and TRUE.

Referenced by main().

static l_int32 testcomp_mem ( PIX pixs,
PIX **  ppixt,
l_int32  index,
l_int32  format 
) [static]

Definition at line 493 of file ioformats_reg.c.

References NULL, pixDestroy(), and pixEqual().

Referenced by main().

static l_int32 test_writemem ( PIX pixs,
l_int32  format,
char *  psfile 
) [static]
static PIX * make_24_bpp_pix ( PIX pixs) [static]

Definition at line 571 of file ioformats_reg.c.

References extractRGBValues(), NULL, pixCreate(), pixGetData(), pixGetDimensions(), and pixGetWpl().

Referenced by main().

static void get_tiff_compression_name ( char *  buf,
l_int32  format 
) [static]

Variable Documentation

LEPT_DLL const char* ImageFileFormatExtensions[]

Definition at line 80 of file writefile.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines