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]

[src]

Retrieve the format subtype from which the header was created.

[src]

The width of the image this header is for.

[src]

The height of the image this header is for.

[src]

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

[src]

Retrieve the underlying bitmap header if any

[src]

Retrieve the underlying graymap header if any

[src]

Retrieve the underlying pixmap header if any

[src]

Retrieve the underlying arbitrary header if any

[src]

Write the header back into a binary stream

Trait Implementations

impl From<BitmapHeader> for PNMHeader
[src]

[src]

Performs the conversion.

impl From<GraymapHeader> for PNMHeader
[src]

[src]

Performs the conversion.

impl From<PixmapHeader> for PNMHeader
[src]

[src]

Performs the conversion.

impl From<ArbitraryHeader> for PNMHeader
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for PNMHeader

impl Sync for PNMHeader