Struct image::pnm::PNMHeader[][src]

pub struct PNMHeader { /* fields omitted */ }

Stores the complete header data of a file.

Internally, provides mechanisms for lossless reencoding. After reading a file with the decoder it is possible to recover the header and construct an encoder. Using the encoder on the just loaded image should result in a byte copy of the original file (for single image pnms without additional trailing data).

Methods

impl PNMHeader
[src]

Retrieve the format subtype from which the header was created.

The width of the image this header is for.

The height of the image this header is for.

The biggest value a sample can have. In other words, the colour resolution.

Retrieve the underlying bitmap header if any

Retrieve the underlying graymap header if any

Retrieve the underlying pixmap header if any

Retrieve the underlying arbitrary header if any

Write the header back into a binary stream

Trait Implementations

impl From<BitmapHeader> for PNMHeader
[src]

Performs the conversion.

impl From<GraymapHeader> for PNMHeader
[src]

Performs the conversion.

impl From<PixmapHeader> for PNMHeader
[src]

Performs the conversion.

impl From<ArbitraryHeader> for PNMHeader
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for PNMHeader

impl Sync for PNMHeader