A structure holding portable-anymap metadata.
More...
#include <grpnm.h>
|
| PnmInfo () |
| Default constructor for an invalid structure.
|
|
| PnmInfo (std::istream &) |
| Constructor reading from an istream.
|
|
| PnmInfo (const std::vector< char > &) |
| Constructor reading from a buffer. More...
|
|
| PnmInfo (const ImageBuffer &) |
| Constructor reading from a Gr::ImageBuffer.
|
|
| PnmInfo (const char *, size_t) |
| Constructor overload for a char buffer.
|
|
| PnmInfo (const unsigned char *, size_t) |
| Constructor overload for unsigned char.
|
|
| PnmInfo (int pn, int dx, int dy, int maxval, size_t offset) |
| Constructor taking the individual metadata items.
|
|
bool | valid () const |
| Returns true if successfully constructed.
|
|
bool | binary () const |
| Returns true if a binary format.
|
|
bool | binary8 () const |
| Returns true if an eight-bit binary format, ie. P5 or P6.
|
|
int | dx () const |
| Returns the image width.
|
|
int | dy () const |
| Returns the image height.
|
|
int | channels () const |
| Returns the number of channels.
|
|
int | pn () const |
| Returns the p-number.
|
|
int | maxval () const |
| Returns the maximum value, or zero for bitmap formats (p1/p4).
|
|
size_t | offset () const |
| Returns the size of the header.
|
|
size_t | rowsize () const |
| Returns dx() * channels().
|
|
A structure holding portable-anymap metadata.
Definition at line 42 of file grpnm.h.
Gr::PnmInfo::PnmInfo |
( |
const std::vector< char > & |
buffer | ) |
|
|
explicit |
Constructor reading from a buffer.
There is no limit on the header size (because of comments and whitespace) so the whole image should be supplied.
Definition at line 337 of file grpnm.cpp.
The documentation for this class was generated from the following files:
- /home/graeme/videotools/src/grlib/grpnm.h
- /home/graeme/videotools/src/grlib/grpnm.cpp