Struct jpeg_decoder::Decoder[][src]

pub struct Decoder<R> { /* fields omitted */ }
Expand description

JPEG decoder

Implementations

Creates a new Decoder using the reader reader.

Returns metadata about the image.

The returned value will be None until a call to either read_info or decode has returned Ok.

Returns the embeded icc profile if the image contains one.

Tries to read metadata from the image without decoding it.

If successful, the metadata can be obtained using the info method.

Configure the decoder to scale the image during decoding.

This efficiently scales the image by the smallest supported scale factor that produces an image larger than or equal to the requested size in at least one axis. The currently implemented scale factors are 1/8, 1/4, 1/2 and 1.

To generate a thumbnail of an exact size, pass the desired size and then scale to the final size using a traditional resampling algorithm.

Decodes the image and returns the decoded pixels if successful.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.