enum Frame {
Glycin(Frame),
Texture(TextureDownloader),
}
Expand description
A frame of an image.
Variants§
Glycin(Frame)
A frame loaded via glycin.
Texture(TextureDownloader)
A downloader for a texture in memory,
Implementations§
source§impl Frame
impl Frame
sourcefn dimensions(&self) -> Option<ImageDimensions>
fn dimensions(&self) -> Option<ImageDimensions>
The dimensions of the frame.
sourcefn is_memory_format_supported(&self) -> bool
fn is_memory_format_supported(&self) -> bool
Whether the memory format of the frame is supported by the image crate.
sourcefn generate_thumbnail(self) -> Option<Thumbnail>
fn generate_thumbnail(self) -> Option<Thumbnail>
Generate a thumbnail of this frame.
Trait Implementations§
source§impl ImageDecoder for Frame
impl ImageDecoder for Frame
source§fn dimensions(&self) -> (u32, u32)
fn dimensions(&self) -> (u32, u32)
Returns a tuple containing the width and height of the image
source§fn color_type(&self) -> ColorType
fn color_type(&self) -> ColorType
Returns the color type of the image data produced by this decoder
source§fn read_image(self, buf: &mut [u8]) -> ImageResult<()>where
Self: Sized,
fn read_image(self, buf: &mut [u8]) -> ImageResult<()>where
Self: Sized,
Returns all the bytes in the image. Read more
source§fn read_image_boxed(self: Box<Self>, _buf: &mut [u8]) -> ImageResult<()>
fn read_image_boxed(self: Box<Self>, _buf: &mut [u8]) -> ImageResult<()>
Use
read_image
instead; this method is an implementation detail needed so the trait can
be object safe. Read moresource§fn original_color_type(&self) -> ExtendedColorType
fn original_color_type(&self) -> ExtendedColorType
Returns the color type of the image file before decoding
source§fn icc_profile(&mut self) -> Result<Option<Vec<u8>>, ImageError>
fn icc_profile(&mut self) -> Result<Option<Vec<u8>>, ImageError>
Returns the ICC color profile embedded in the image, or
Ok(None)
if the image does not have one. Read moresource§fn total_bytes(&self) -> u64
fn total_bytes(&self) -> u64
Returns the total number of bytes in the decoded image. Read more
source§fn set_limits(&mut self, limits: Limits) -> Result<(), ImageError>
fn set_limits(&mut self, limits: Limits) -> Result<(), ImageError>
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl !Send for Frame
impl !Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more