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

JPEG decoder

Implementations

decode_scan_lossless

Creates a new Decoder using the reader reader.

Set maximum buffer size allowed for decoded images

Returns metadata about the image.

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

Returns raw exif data, starting at the TIFF header, if the image contains any.

The returned value will be None until a call to 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.