Struct jpegxr::ImageDecode [−][src]
Expand description
High-level JPEG XR image decoder struct. Requires a seekable data source, such as a File. You can decode multiple subsets of the image, though this is not yet well-tested.
Implementations
impl<R> ImageDecode<R> where
R: Read + Seek,
[src]
impl<R> ImageDecode<R> where
R: Read + Seek,
[src]pub fn with_reader(reader: R) -> Result<Self>
[src]
pub fn with_reader(reader: R) -> Result<Self>
[src]Create a new JPEG XR image decoder for the given input. This will consume the reader, and free it when done.
pub fn get_pixel_format(&self) -> Result<PixelFormat>
[src]
pub fn get_pixel_format(&self) -> Result<PixelFormat>
[src]Return the pixel format of the decoded image. This is just a big enum; you’re responsible for knowing how to interpret the image data yourself from that. This could fail if a new unknown pixel type appears in the wild.
pub fn copy(
&mut self,
rect: &Rect,
dest: &mut [u8],
stride: usize
) -> Result<()>
[src]
pub fn copy(
&mut self,
rect: &Rect,
dest: &mut [u8],
stride: usize
) -> Result<()>
[src]Decode pixel data and copy it into a provided output buffer. You can ask for just part of the image to decode fewer macroblocks. However this mode is not well tested.
pub fn copy_all(&mut self, dest: &mut [u8], stride: usize) -> Result<()>
[src]
pub fn copy_all(&mut self, dest: &mut [u8], stride: usize) -> Result<()>
[src]Decode the entire image in one go, for convenience.
pub fn into_reader(self) -> R
[src]
pub fn into_reader(self) -> R
[src]Free the image decoder and return the input reader. Only needed if you want to reuse the same reader struct on something else, but it feels so Rustic!
Trait Implementations
Auto Trait Implementations
impl<R> RefUnwindSafe for ImageDecode<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> !Send for ImageDecode<R>
impl<R> !Sync for ImageDecode<R>
impl<R> Unpin for ImageDecode<R>
impl<R> UnwindSafe for ImageDecode<R> where
R: UnwindSafe,
R: UnwindSafe,