#[non_exhaustive]
pub enum ImFormat {
Show 18 variants GIF, PNG, BMP, JPEG, WEBP, QOI, PSD, XCF, ICO, AVIF, TIFF, OpenEXR, PCX, TGA, DDS, HEIF, JP2K, DIB,
}

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

Graphics Interchange Format files in version GIF87a or GIF89a.

PNG

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

BMP

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

JPEG

Joint Photographic Experts Group files.

WEBP

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

QOI

Quite OK Image format files.

PSD

Adobe Photoshop files.

XCF

GIMP files.

ICO

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

AVIF

AV1 Image File Format.

TIFF

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

OpenEXR

OpenEXR files.

PCX

PiCture eXchange files.

TGA

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

DirectDraw Surface files.

HEIF

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

JP2K

JPEG 2000 files.

DIB

Device-Independent Bitmap files.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.