[−][src]Struct gift::Decoder
GIF file decoder
Can be converted to one of three Iterator
s:
- into_iter / into_rasters for high-level
Raster
s - into_frames for mid-level Frames
- into_blocks for low-level Blocks
Example: Get a Raster
from a GIF
// ... open a `File` as "gif" if let Some(raster) = gift::Decoder::new(gif).into_iter().next() { // was there a decoding error? let raster = raster?; // ... work with raster }
Methods
impl<R: Read> Decoder<BufReader<R>>
[src]
impl<R: Read> Decoder<R>
[src]
pub fn new_unbuffered(reader: R) -> Self
[src]
Create a new unbuffered GIF decoder.
pub fn max_image_sz(self, max_image_sz: Option<usize>) -> Self
[src]
Set the maximum image size (in bytes) to allow for decoding.
ⓘImportant traits for Blocks<R>pub fn into_blocks(self) -> Blocks<R>
[src]
ⓘImportant traits for Blocks<R>
Convert into a block Iterator
.
ⓘImportant traits for Frames<R>pub fn into_frames(self) -> Frames<R>
[src]
ⓘImportant traits for Frames<R>
Convert into a frame Iterator
.
ⓘImportant traits for Rasters<R>pub fn into_rasters(self) -> Rasters<R>
[src]
ⓘImportant traits for Rasters<R>
Convert into a raster Iterator
.
Trait Implementations
impl<R: Read> IntoIterator for Decoder<R>
[src]
Auto Trait Implementations
impl<R> RefUnwindSafe for Decoder<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for Decoder<R> where
R: Send,
R: Send,
impl<R> Sync for Decoder<R> where
R: Sync,
R: Sync,
impl<R> Unpin for Decoder<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for Decoder<R> where
R: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,