Enum imsz::ImFormat

source ·
#[non_exhaustive]
pub enum ImFormat {
Show 19 variants GIF = 1, PNG = 2, BMP = 3, JPEG = 4, WEBP = 5, QOI = 6, PSD = 7, XCF = 8, ICO = 9, AVIF = 10, TIFF = 11, OpenEXR = 12, PCX = 13, TGA = 14, DDS = 15, HEIF = 16, JP2K = 17, DIB = 18, VTF = 19,
}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

GIF = 1

Graphics Interchange Format files in version GIF87a or GIF89a.

§

PNG = 2

Portable Network Graphics files. Requires the first chunk to be IHDR.

§

BMP = 3

Windows Bitmap, both for Windows 2.0 (BITMAPCOREHEADER) and for newer versions (BITMAPINFOHEADER).

§

JPEG = 4

Joint Photographic Experts Group files.

§

WEBP = 5

WebP files. Supported sub-formats: VP8 , VP8L, VP8X.

§

QOI = 6

Quite OK Image format files.

§

PSD = 7

Adobe Photoshop files.

§

XCF = 8

GIMP files.

§

ICO = 9

ICO files can contain multiple images. This returns the dimensions of the biggest image in the file.

§

AVIF = 10

AV1 Image File Format.

§

TIFF = 11

Tag Image File Format. Supports big endian and little endian TIFF files.

§

OpenEXR = 12

OpenEXR files.

§

PCX = 13

PiCture eXchange files.

§

TGA = 14

TARGA (Truevision Advanced Raster Graphics Adapter) files.

Only if the file ends in b"TRUEVISION-XFILE.\0" since otherwise there is no good way to detect TGA files. Note that this string is optional to this file format and thus there can be TGA files that aren’t supported by this library.

§

DDS = 15

DirectDraw Surface files.

§

HEIF = 16

HEIC/HEIF files. These are extremely similar to AVIF and use the same parsing code.

§

JP2K = 17

JPEG 2000 files.

§

DIB = 18

Device-Independent Bitmap files.

§

VTF = 19

Valve Texture Format.

Implementations§

source§

impl ImFormat

source

pub fn name(&self) -> &'static str

Trait Implementations§

source§

impl Clone for ImFormat

source§

fn clone(&self) -> ImFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ImFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ImFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for ImFormat

source§

fn eq(&self, other: &ImFormat) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for ImFormat

source§

impl StructuralPartialEq for ImFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.