/Users/bernard/b20/bsoft/src/rwimg/rwPNM.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/rwimg/rwPNM.cpp - Functions for reading and writing PBM, PGM and PPM files.

SYNOPSIS

#include 'rwPNM.h'
#include 'utilities.h'
#include <fstream>

  Functions
char * pnm_next_item (char *aptr)
unsigned char * pnm_read_data (ifstream *fimg, Bimage *p)
int readPNM (Bimage *p, int readdata, int img_select)
Reading a PNM type file. A simple image format. PBM bit image format. PGM grayscale image format. PPM RGB color image format. File format extensions: .pbm, .pgm, .ppm The header contains ascii text indicating the image and element sizes. Data types: byte, unsigned short.
int writePNM (Bimage *p)
Writing a PNM type file. A simple image format.

  Variables
int verbose

Detailed Description

Functions for reading and writing PBM, PGM and PPM files.

Author:
    Bernard Heymann

Date:
    Created: 20110317

    Modified: 20120211

Definition in file rwPNM.cpp.

Function Documentation

  char* pnm_next_item (char * aptr)

Definition at line 16 of file rwPNM.cpp.

  unsigned char* pnm_read_data (ifstream * fimg, Bimage * p)

Definition at line 31 of file rwPNM.cpp.

  int readPNM (Bimage * p, int readdata, int img_select)

Reading a PNM type file. A simple image format. PBM bit image format. PGM grayscale image format. PPM RGB color image format. File format extensions: .pbm, .pgm, .ppm The header contains ascii text indicating the image and element sizes. Data types: byte, unsigned short.

Parameters:
    *p the image structure.
    readdata flag to activate reading of image data.
    img_select image selection in multi-image file (-1 = all images).

Returns:
    int 0, <0 on error.

Definition at line 79 of file rwPNM.cpp.

  int writePNM (Bimage * p)

Writing a PNM type file. A simple image format.

Parameters:
    *p the image structure.

Returns:
    int 0, <0 on error.

Definition at line 182 of file rwPNM.cpp.

Variable Documentation

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.