Type Alias image::codecs::pnm::PNMHeader

source ·
pub type PNMHeader = PnmHeader;
👎Deprecated: Use PnmHeader instead
Expand description

PNM Header

An alias of PnmHeader.

TODO: remove

Aliased Type§

struct PNMHeader { /* private fields */ }

Implementations

source§

impl PnmHeader

source

pub fn subtype(&self) -> PNMSubtype

Retrieve the format subtype from which the header was created.

source

pub fn width(&self) -> u32

The width of the image this header is for.

source

pub fn height(&self) -> u32

The height of the image this header is for.

source

pub fn maximal_sample(&self) -> u32

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

source

pub fn as_bitmap(&self) -> Option<&BitmapHeader>

Retrieve the underlying bitmap header if any

source

pub fn as_graymap(&self) -> Option<&GraymapHeader>

Retrieve the underlying graymap header if any

source

pub fn as_pixmap(&self) -> Option<&PixmapHeader>

Retrieve the underlying pixmap header if any

source

pub fn as_arbitrary(&self) -> Option<&ArbitraryHeader>

Retrieve the underlying arbitrary header if any

source

pub fn write(&self, writer: &mut dyn Write) -> Result<()>

Write the header back into a binary stream

Trait Implementations

source§

impl From<GraymapHeader> for PnmHeader

source§

fn from(header: GraymapHeader) -> Self

Converts to this type from the input type.
source§

impl From<ArbitraryHeader> for PnmHeader

source§

fn from(header: ArbitraryHeader) -> Self

Converts to this type from the input type.
source§

impl From<PixmapHeader> for PnmHeader

source§

fn from(header: PixmapHeader) -> Self

Converts to this type from the input type.
source§

impl From<BitmapHeader> for PnmHeader

source§

fn from(header: BitmapHeader) -> Self

Converts to this type from the input type.