pub enum ImageFormat {
Png,
Jpeg,
Gif,
Bmp,
Tiff,
Emf,
Wmf,
EffectPicture,
Unknown,
}Expand description
The format of an image file.
Variants§
Png
PNG (ISO/IEC 15948).
Jpeg
JPEG (ISO/IEC 10918-1), in a JFIF or Exif file.
Gif
GIF.
Bmp
Windows bitmap (BMP).
Tiff
TIFF.
Emf
Windows Enhanced Metafile (EMF), defined by MS-EMF.
Wmf
Windows Metafile (WMF), defined by MS-WMF.
EffectPicture
An effect picture that a layout made: what a part of a page that Word draws as one
picture of pixels shows, such as the plot area of a 3-D chart, which the output stage
draws into pixels. No file of a document is in this format: ImageFormat::detect
never gives it.
Unknown
A format that none of the others matches.
Implementations§
Source§impl ImageFormat
impl ImageFormat
Sourcepub fn detect(data: &[u8]) -> ImageFormat
pub fn detect(data: &[u8]) -> ImageFormat
Detects the format from the signature at the start of an image file.
Trait Implementations§
Source§impl Clone for ImageFormat
impl Clone for ImageFormat
Source§fn clone(&self) -> ImageFormat
fn clone(&self) -> ImageFormat
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 moreimpl Copy for ImageFormat
Source§impl Debug for ImageFormat
impl Debug for ImageFormat
Source§impl Display for ImageFormat
impl Display for ImageFormat
impl Eq for ImageFormat
Source§impl Hash for ImageFormat
impl Hash for ImageFormat
Source§impl PartialEq for ImageFormat
impl PartialEq for ImageFormat
impl StructuralPartialEq for ImageFormat
Auto Trait Implementations§
impl Forget for ImageFormat
impl Freeze for ImageFormat
impl Move for ImageFormat
impl RefUnwindSafe for ImageFormat
impl Send for ImageFormat
impl Sync for ImageFormat
impl Unpin for ImageFormat
impl UnsafeUnpin for ImageFormat
impl UnwindSafe for ImageFormat
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.