[−][src]Struct gift::Decoder
GIF file decoder
Can be converted to one of three Iterator
s:
- into_iter / into_steps for high-level Steps
- into_frames for mid-level Frames
- into_blocks for low-level Blocks
Example: Get a Raster
from a GIF
use gift::Decoder; // ... open a `File` as "gif" if let Some(step) = Decoder::new(gif).into_steps().next() { // was there a decoding error? let step = step?; let raster = step.raster(); // ... work with raster }
Implementations
impl<R: Read> Decoder<R>
[src]
pub fn new(reader: R) -> Self
[src]
Create a new 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.
pub fn into_blocks(self) -> Blocks<R>ⓘ
[src]
Convert into a block Iterator
.
pub fn into_frames(self) -> Frames<R>ⓘ
[src]
Convert into a frame Iterator
.
pub fn into_steps(self) -> Steps<R>ⓘ
[src]
Convert into a step Iterator
without looping.
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,
pub 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?
pub 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.
pub 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>,