VegaRise.NET
Back to DOM

ImageTypeEnum

Definition

Namespace
DOM.Enums
Assembly
DOM.dll

Represents the supported image formats for elements.

Remarks

Used by and by export operations to indicate the actual image format. Not all formats are supported by every runtime platform; WBMP falls back to BMP if unsupported. Image.Type

Examples

csharp
1// 1. Bitmap
2var t = ImageType.bmp;
3
csharp
1// 2. PNG
2var t = ImageType.png;
3
csharp
1// 3. JPEG
2var t = ImageType.jpeg;
3
csharp
1// 4. Choose based on the file extension
2var t = Path.GetExtension("logo.png").ToLowerInvariant() switch
3{
4 ".png" => ImageType.png,
5 ".jpg" => ImageType.jpg,
6 ".jpeg" => ImageType.jpeg,
7 ".gif" => ImageType.gif,
8 _ => ImageType.png
9};
10

Fields

bmp

Windows Bitmap (.bmp).

emf

Enhanced Windows Metafile (.emf).

gif

Graphics Interchange Format (.gif).

icon

Windows Icon (.ico).

jpeg

JPEG/JIFF Image (.jpeg).

jpg

JPEG/JIFF Image (.jpg).

pcx

PC Paintbrush Bitmap (.pcx).

png

Portable Network Graphics (.png).

tiff

Tagged Image File Format (.tiff).

wbmp

Wireless Bitmap (.wbmp), falls back to BMP if unsupported.

webp

WebP image format.

wmf

Windows Metafile (.wmf).

VegaRiseVDocs.NET

Reset Password

Enter your email and we'll send you a link to reset your password.

Remember your password? Sign in