Struct turbojpeg::Decompressor[][src]

pub struct Decompressor { /* fields omitted */ }

Decompresses JPEG data into raw pixels.

Implementations

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]

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 Debug for Decompressor[src]

impl Send for Decompressor[src]

Auto Trait Implementations

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, 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.