| Bsoft 2.0.5 Bernard's software package

Functions
rwPNM.h File Reference

Header file for reading and writing PNM files. More...

`#include "rwimg.h"`

Go to the source code of this file.

## Functions
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. More...
int | writePNM (Bimage *p)
| Writing a PNM type file. A simple image format. More...

## Detailed Description

Header file for reading and writing PNM files.

Author
  Bernard Heymann

Date
  Created: 20110317
  Modified: 20111217

      Format: 2D simple image file format

Definition in file rwPNM.h.

## Function Documentation

## ◆ readPNM()

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.

## ◆ writePNM()

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.