#include <stdio.h>#include <string.h>#include <stdlib.h>#include "allheaders.h"Функции | |
| static l_int32 | pnmReadNextAsciiValue (FILE *fp, l_int32 *pval) |
| static l_int32 | pnmSkipCommentLines (FILE *fp) |
| PIX * | pixReadStreamPnm (FILE *fp) |
| l_int32 | pixWriteStreamPnm (FILE *fp, PIX *pix) |
| l_int32 | pixWriteStreamAsciiPnm (FILE *fp, PIX *pix) |
| PIX * | pixReadMemPnm (const l_uint8 *cdata, size_t size) |
| l_int32 | pixWriteMemPnm (l_uint8 **pdata, size_t *psize, PIX *pix) |
Переменные | |
| static const l_int32 | MAX_PNM_WIDTH = 100000 |
| static const l_int32 | MAX_PNM_HEIGHT = 100000 |
| PIX* pixReadStreamPnm | ( | FILE * | fp | ) |
Input: stream opened for read Return: pix, or null on error
Input: stream opened for write pix Return: 0 if OK; 1 on error
Writes "ascii" format only: 1 bpp --> pbm (P1) 2, 4, 8, 16 bpp, no colormap or grayscale colormap --> pgm (P2) 2, 4, 8 bpp with color-valued colormap, or rgb --> rgb ppm (P3)
Input: stream opened for write pix Return: 0 if OK; 1 on error
Notes: (1) This writes "raw" packed format only: 1 bpp --> pbm (P4) 2, 4, 8, 16 bpp, no colormap or grayscale colormap --> pgm (P5) 2, 4, 8 bpp with color-valued colormap, or rgb --> rgb ppm (P6) (2) 24 bpp rgb are not supported in leptonica, but this will write them out as a packed array of bytes (3 to a pixel).
Return: 0 if OK, 1 on error or EOF.
Notes: (1) This reads the next sample value in ascii from the the file.
| static l_int32 pnmSkipCommentLines | ( | FILE * | fp | ) | [static] |
Return: 0 if OK, 1 on error or EOF
Notes: (1) Comment lines begin with '#' (2) Usage: caller should check return value for EOF
const l_int32 MAX_PNM_HEIGHT = 100000 [static] |
const l_int32 MAX_PNM_WIDTH = 100000 [static] |
1.5.9