pub struct JxlDecoder { /* private fields */ }Expand description
Decodes a JPEG XL stream.
Implementations§
Source§impl JxlDecoder
impl JxlDecoder
Sourcepub fn new<S>(source: S, limits: Limits) -> Result<JxlDecoder, PixelsError>where
S: Source,
pub fn new<S>(source: S, limits: Limits) -> Result<JxlDecoder, PixelsError>where
S: Source,
Read the file and parse its headers; the pixels decode when the first row is read.
§Errors
Returns PixelsError::Malformed for headers it rejects, or
PixelsError::LimitExceeded if the image exceeds limits.
Trait Implementations§
Source§impl Debug for JxlDecoder
impl Debug for JxlDecoder
Source§impl Decoder for JxlDecoder
impl Decoder for JxlDecoder
Source§fn source_info(&self) -> SourceInfo
fn source_info(&self) -> SourceInfo
Bit depth, and lossy (XYB) or lossless.
Source§fn descriptor(&self) -> ImageDescriptor
fn descriptor(&self) -> ImageDescriptor
The shape of the image, known after the header is parsed.
Source§fn orientation(&self) -> Orientation
fn orientation(&self) -> Orientation
How the stored image must be turned to display upright, as its
metadata declares. Read more
Source§fn icc_profile(&self) -> Option<&[u8]>
fn icc_profile(&self) -> Option<&[u8]>
The embedded ICC colour profile, if the file carries one. Read more
Source§fn exif(&self) -> Option<&[u8]>
fn exif(&self) -> Option<&[u8]>
The embedded EXIF block, if the file carries one: the TIFF-structured
bytes from the byte-order mark (
II or MM), without the Exif\0\0
identifier a JPEG wraps it in. Read moreSource§fn animation(&self) -> Option<Animation>
fn animation(&self) -> Option<Animation>
The source’s animation, if it has more than one frame. Read more
Source§fn read_row(&mut self, out: &mut [u8]) -> Result<(), PixelsError>
fn read_row(&mut self, out: &mut [u8]) -> Result<(), PixelsError>
Decode the next row, top to bottom, into
out. Read moreSource§fn capability(&self) -> DecodeCapability
fn capability(&self) -> DecodeCapability
What this decoder can produce without a full decode.
Source§fn read_region(
&mut self,
region: Region,
out: &mut TileMut<'_>,
) -> Result<(), PixelsError>
fn read_region( &mut self, region: Region, out: &mut TileMut<'_>, ) -> Result<(), PixelsError>
Decode an arbitrary region into
out. Read moreSource§fn reduced_descriptor(&self, target: (u32, u32)) -> Option<ImageDescriptor>
fn reduced_descriptor(&self, target: (u32, u32)) -> Option<ImageDescriptor>
What this decoder would produce if asked for
target or larger, when
the format lets it reach that size more cheaply than a full decode. Read moreSource§fn reduce_to(&mut self, descriptor: ImageDescriptor) -> Result<(), PixelsError>
fn reduce_to(&mut self, descriptor: ImageDescriptor) -> Result<(), PixelsError>
Auto Trait Implementations§
impl Freeze for JxlDecoder
impl RefUnwindSafe for JxlDecoder
impl Send for JxlDecoder
impl Sync for JxlDecoder
impl Unpin for JxlDecoder
impl UnsafeUnpin for JxlDecoder
impl UnwindSafe for JxlDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more