Table of Contents

Enum ImageOutputFormat

Namespace
LMKit.Media.Image
Assembly
LM-Kit.NET.dll

The image formats the toolkit ENCODES: the output side of Encode(ImageOutputFormat, ImageEncoderOptions) and Save(string, ImageOutputFormat, ImageEncoderOptions). The toolkit decodes more formats than it encodes (HEIC, AVIF, GIF, PSD, ...); this enum is the honest list of what it can write, and EncodableExtensions is the same list as file extensions.

public enum ImageOutputFormat

Fields

Png = 0

Portable Network Graphics: lossless, alpha, gray, RGB and one-bit images.

Jpeg = 1

JPEG: lossy, gray, RGB (YCbCr-coded) and CMYK (YCCK-coded under an Adobe marker).

Webp = 2

WebP: lossy or lossless, alpha.

Tiff = 3

Tagged Image File Format: lossless codecs, JPEG-in-TIFF, one-bit Group 4, CMYK, multiple pages.

Bmp = 4

Windows bitmap: uncompressed or RLE8 (gray only).

Tga = 5

Truevision TARGA: uncompressed or RLE.

Pnm = 6

Portable Anymap: PGM for gray, PPM for RGB, PAM for RGBA.

Examples

using LMKit.Media.Image;

using ImageBuffer image = ImageBuffer.Load("photo.heic");
byte[] jpeg = image.Encode(ImageOutputFormat.Jpeg, new ImageBuffer.ImageEncoderOptions { Quality = 85 });
Share