[][src]Struct pxm::PFM

pub struct PFM {
    pub width: usize,
    pub height: usize,
    pub color: bool,
    pub scale_factor: f32,
    pub endian: Endian,
    pub data: Vec<f32>,
}

PFM struct contains all the information about a PFM file. Note that

Fields

width: usize

Width of image.

height: usize

Hight of image.

color: bool

True for RGB image, False for monochrome image.

scale_factor: f32

Scaling factor of pixel values.

endian: Endian

Endianness of pixel value in the PFM file.

data: Vec<f32>

Raw pixel values which are stored in the top to bottom, left to right order without dividing the scale factor.

Methods

impl PFM[src]

pub fn read_from(reader: &mut impl Read) -> Result<PFM, &'static str>[src]

Create PFM struct from objects implementing Read trait.

pub fn write_into(&self, writer: &mut impl Write) -> Result<(), &'static str>[src]

Encode and write PFM to objects implementing Write trait.

Trait Implementations

impl PartialEq<PFM> for PFM[src]

impl Debug for PFM[src]

Auto Trait Implementations

impl Send for PFM

impl Sync for PFM

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]