Struct jpegxl_rs::decode::JxlDecoder[][src]

pub struct JxlDecoder<'a> { /* fields omitted */ }

JPEG XL Decoder

Implementations

impl<'a> JxlDecoder<'a>[src]

pub fn set_num_channels(&mut self, value: u32)[src]

Set number of channels

pub fn set_endianness(&mut self, value: Endianness)[src]

Set pixel endianness

pub fn set_align(&mut self, value: usize)[src]

Set pixel scanlines alignment

pub fn keep_orientation(&mut self, value: bool)[src]

Keep original orientation or not. Default: false

Note: Set true could make decoding faster, but you need to manually transform the result with the correct orientation.

pub fn decode<T: PixelType>(
    &self,
    data: &[u8]
) -> Result<DecoderResult<T>, DecodeError>
[src]

Decode a JPEG XL image

Currently only support RGB(A)8/16/32 encoded static image. Other info are discarded.

Errors

Return a DecodeError when internal decoder fails

Panics

Only when underlying library events order is wrong

pub fn decode_jpeg(&self, data: &[u8]) -> Result<DecoderResult<u8>, DecodeError>[src]

Decode a JPEG XL image and reconstruct JPEG data

Currently only support RGB(A)8/16/32 encoded static image. Other info are discarded.

Errors

Return a DecodeError when internal decoder fails

Panics

Only when underlying library events order is wrong

Trait Implementations

impl<'a> Drop for JxlDecoder<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for JxlDecoder<'a>

impl<'a> !Send for JxlDecoder<'a>

impl<'a> !Sync for JxlDecoder<'a>

impl<'a> Unpin for JxlDecoder<'a>

impl<'a> !UnwindSafe for JxlDecoder<'a>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.