Struct Preview

pub struct Preview { pub size: Vec2<usize>, pub pixel_data: Vec<i8> }

A small rgba image of i8 values that approximates the real exr image.

Fields

size: Vec2<usize>

The dimensions of the preview image.

pixel_data: Vec<i8>

An array with a length of 4 × width × height. The pixels are stored in LineOrder::Increasing. Each pixel consists of the four u8 values red, green, blue, alpha.

Implementations

impl Preview

fn byte_size(&self) -> usize

Number of bytes this would consume in an exr file.

fn write<W: Write>(&self, write: &mut W) -> UnitResult

Without validation, write this instance to the byte stream.

fn read<R: Read>(read: &mut R) -> Result<Self>

Read the value without validating.

fn validate(&self, strict: bool) -> UnitResult

Validate this instance.

Trait Implementations

impl Clone for Preview

fn clone(&self) -> Self

impl Debug for Preview

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for Preview

impl PartialEq for Preview

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for Preview

Auto Trait Implementations

impl Freeze for Preview

impl RefUnwindSafe for Preview

impl Send for Preview

impl Sync for Preview

impl Unpin for Preview

impl UnsafeUnpin for Preview

impl UnwindSafe for Preview

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for Preview where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for Preview where ST: ?Sized, DT: ?Sized,

impl<T> Any for Preview where T: 'static + ?Sized,

impl<T> Borrow<T> for Preview where T: ?Sized,

impl<T> BorrowMut<T> for Preview where T: ?Sized,

impl<T> CloneToUninit for Preview where T: Clone,

impl<T> From<T> for Preview

impl<T> Pointable for Preview

impl<T> Read<Exclusive, BecauseExclusive> for Preview where T: ?Sized,

impl<T> ToOwned for Preview where T: Clone,

impl<T, U> Into<U> for Preview where U: From<T>,

impl<T, U> TryFrom<U> for Preview where U: Into<T>,

impl<T, U> TryInto<U> for Preview where U: TryFrom<T>,