Interface ImageFormatInfo

Describes an image format that can be used with Editor.toImage.

see

supportedImageFormats

Hierarchy

  • ImageFormatInfo

Index

Properties

fileExtension

fileExtension: string

The most common file extension for images of this type, with no . prefix. For example, "jpg" for the JPEG image format.

format

format: string

The format identifier, such as "jpeg" for the JPEG image format. The ImageFormatOptions.format property must be assigned this value to specify the described format. Format identifiers are guaranteed to consist of lower case letters and digits from the basic ASCII character set (/^[a-z0-9]+$/).

lossy

lossy: boolean

If true, the image format is lossy, meaning that it does not preserve the source image exactly. Generally this means that ImageFormatOptions.quality will have a meaningful effect on the image.

Notes:

  1. Formats such as AVIF that support both lossy and lossless encoding are reported as lossy.
  2. The GIF format, while not considered lossy, allows only 256 colours. Images with more than 256 colours will lose information due to quantization (colour reduction). For this reason, the GIF format is not recommended.

mimeType

mimeType: string

The Internet media type (MIME type) of the format, such as "image/svg+xml".

name

name: string

The short common name of the format, as it might be presented to users.

This API is still under development and is subject to change. Copyright © Math I Can Do Solutions Incorporated and/or its licensors.