Struct turbojpeg::Decompressor [−][src]
pub struct Decompressor { /* fields omitted */ }
Decompresses JPEG data into raw pixels.
Implementations
impl Decompressor
[src]
impl Decompressor
[src]pub fn new() -> Result<Decompressor>
[src]
Create a new decompressor instance.
pub fn read_header(&mut self, jpeg_data: &[u8]) -> Result<DecompressHeader>
[src]
Read the JPEG header without decompressing the image.
pub fn decompress_to_slice(
&mut self,
jpeg_data: &[u8],
image: Image<&mut [u8]>
) -> Result<()>
[src]
&mut self,
jpeg_data: &[u8],
image: Image<&mut [u8]>
) -> Result<()>
Decompress a JPEG image in jpeg_data
into image
.
The decompressed image is stored in the pixel data of the given image
, which must be
fully initialized by the caller. Use read_header
to
determine the image size before calling this method.
Trait Implementations
impl Send for Decompressor
[src]
impl Send for Decompressor
[src]Auto Trait Implementations
impl RefUnwindSafe for Decompressor
impl RefUnwindSafe for Decompressor
impl !Sync for Decompressor
impl !Sync for Decompressor
impl Unpin for Decompressor
impl Unpin for Decompressor
impl UnwindSafe for Decompressor
impl UnwindSafe for Decompressor