#include <PnmCodec.h>
Inheritance diagram for prapi::PnmCodec< T >:

This Codec is able to read and write integer-valued binary, gray-scale and color images in plain (ascii) and raw formats. The codec only works with RGBColor and int images. Int images are written as binary when possible.
Public Methods | |
| PnmCodec () | |
| A specialization for integer-valued gray-scale images. | |
| void | setRaw (bool raw) |
| Set the raw flag. | |
| bool | isRaw () |
| Check whether the output will be in raw format. | |
| bool | isBinaryAllowed () |
| Check if binary output format is allowed (if possible). | |
| void | setBinaryAllowed (bool allow) |
| Enable or disable binary output. | |
| void | decodeMatrix (std::istream &in, util::Matrix< T > &mat) throw (util::MatrixException&, util::io::IOException&) |
| void | encodeMatrix (std::ostream &out, const util::Matrix< T > &mat) throw (util::MatrixException&, util::io::IOException&) |
|
||||||||||
|
Enable or disable binary output. If allowed, binary file will be produced when the data to be encoded contains only ones and zeros. Binary format is disabled by default. |
|
||||||||||
|
Set the raw flag. This flag controls whether the images are written in raw format. Default is true. |