[−][src]Struct gif::Reader
GIF decoder
Methods
impl<R> Reader<R> where
R: Read,
[src]
impl<R> Reader<R> where
R: Read,
pub fn next_frame_info(
&mut self
) -> Result<Option<&Frame<'static>>, DecodingError>
[src]
pub fn next_frame_info(
&mut self
) -> Result<Option<&Frame<'static>>, DecodingError>
Returns the next frame info
pub fn read_next_frame(
&mut self
) -> Result<Option<&Frame<'static>>, DecodingError>
[src]
pub fn read_next_frame(
&mut self
) -> Result<Option<&Frame<'static>>, DecodingError>
Reads the next frame from the image.
Do not call Self::next_frame_info
beforehand.
Deinterlaces the result.
pub fn read_into_buffer(&mut self, buf: &mut [u8]) -> Result<(), DecodingError>
[src]
pub fn read_into_buffer(&mut self, buf: &mut [u8]) -> Result<(), DecodingError>
Reads the data of the current frame into a pre-allocated buffer.
Self::next_frame_info
needs to be called beforehand.
The length of buf
must be at least Self::buffer_size
.
Deinterlaces the result.
pub fn fill_buffer(&mut self, buf: &mut [u8]) -> Result<bool, DecodingError>
[src]
pub fn fill_buffer(&mut self, buf: &mut [u8]) -> Result<bool, DecodingError>
Reads data of the current frame into a pre-allocated buffer until the buffer has been filled completely.
Self::next_frame_info
needs to be called beforehand. Returns true
if the supplied
buffer could be filled completely. Should not be called after false
had been returned.
pub fn buffer_size(&self) -> usize
[src]
pub fn buffer_size(&self) -> usize
Output buffer size
pub fn line_length(&self) -> usize
[src]
pub fn line_length(&self) -> usize
Line length of the current frame
pub fn palette(&self) -> Result<&[u8], DecodingError>
[src]
pub fn palette(&self) -> Result<&[u8], DecodingError>
Returns the color palette relevant for the current (next) frame
pub fn global_palette(&self) -> Option<&[u8]>
[src]
pub fn global_palette(&self) -> Option<&[u8]>
The global color palette
pub fn width(&self) -> u16
[src]
pub fn width(&self) -> u16
Width of the image
pub fn height(&self) -> u16
[src]
pub fn height(&self) -> u16
Height of the image
pub fn bg_color(&self) -> Option<usize>
[src]
pub fn bg_color(&self) -> Option<usize>
Index of the background color in the global palette
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more