Struct jpegxl_rs::decode::JxlDecoder [−][src]
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]
&self,
data: &[u8]
) -> Result<DecoderResult<T>, DecodeError>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,