pub enum StandardFormat {
Gif,
Jpeg,
Png,
WebP,
Jxl,
Tiff,
Avif,
Heic,
Svg,
Apv,
Ppm,
}Expand description
Supported standard (non-RAW) image formats.
Variants§
Gif
GIF (Graphics Interchange Format)
Jpeg
JPEG / JFIF
Png
PNG (Portable Network Graphics)
WebP
WebP
Jxl
JPEG XL
Tiff
TIFF
Avif
AVIF
Heic
HEIC / HEIF (High Efficiency Image Container using H.265)
Svg
SVG (Scalable Vector Graphics)
Apv
APV (All-intra Predictive Video codec)
Ppm
PPM / Netpbm (Portable Pixmap family: P5, P6, P7, PFM)
Implementations§
Source§impl StandardFormat
impl StandardFormat
Sourcepub fn from_extension(ext: &str) -> Option<StandardFormat>
pub fn from_extension(ext: &str) -> Option<StandardFormat>
Look up a format by file extension (case-insensitive).
Common aliases are supported (e.g. jpeg/jpe/jfif for JPEG,
tif for TIFF, heif for HEIC, svgz for SVG, pgm/pnm/pam/pfm
for PPM).
Sourcepub fn supports_decode(self) -> bool
pub fn supports_decode(self) -> bool
Whether this format can be decoded to an RgbImage.
Sourcepub fn supports_encode(self) -> bool
pub fn supports_encode(self) -> bool
Whether this format can be encoded from an RgbImage.
Trait Implementations§
Source§impl Clone for StandardFormat
impl Clone for StandardFormat
Source§fn clone(&self) -> StandardFormat
fn clone(&self) -> StandardFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StandardFormat
impl Debug for StandardFormat
Source§impl<'de> Deserialize<'de> for StandardFormat
impl<'de> Deserialize<'de> for StandardFormat
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for StandardFormat
impl Display for StandardFormat
Source§impl Hash for StandardFormat
impl Hash for StandardFormat
Source§impl PartialEq for StandardFormat
impl PartialEq for StandardFormat
Source§fn eq(&self, other: &StandardFormat) -> bool
fn eq(&self, other: &StandardFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for StandardFormat
impl Serialize for StandardFormat
impl Copy for StandardFormat
impl Eq for StandardFormat
impl StructuralPartialEq for StandardFormat
Auto Trait Implementations§
impl Freeze for StandardFormat
impl RefUnwindSafe for StandardFormat
impl Send for StandardFormat
impl Sync for StandardFormat
impl Unpin for StandardFormat
impl UnsafeUnpin for StandardFormat
impl UnwindSafe for StandardFormat
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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