Imaging API

Images and image codecs.

Classes

Typedefs

Enumerations

Variables

Typedef Documentation

typedef BLResult(* BLImageScaleUserFunc)(double* dst, const double* tArray, size_t n, const void* data)

A user function that can be used by BLImage::scale().

Enumeration Type Documentation

BLFormat : uint32_tenum

Pixel format.

Compatibility Table

+---------------------+---------------------+-----------------------------+
| Blend2D Format | Cairo Format | QImage::Format |
+---------------------+---------------------+-----------------------------+
| BL_FORMAT_PRGB32 | CAIRO_FORMAT_ARGB32 | Format_ARGB32_Premultiplied |
| BL_FORMAT_XRGB32 | CAIRO_FORMAT_RGB24 | Format_RGB32 |
| BL_FORMAT_A8 | CAIRO_FORMAT_A8 | n/a |
+---------------------+---------------------+-----------------------------+
ConstantDescription
BL_FORMAT_NONE 

None or invalid pixel format.

BL_FORMAT_PRGB32 

32-bit premultiplied ARGB pixel format (8-bit components).

BL_FORMAT_XRGB32 

32-bit (X)RGB pixel format (8-bit components, alpha ignored).

BL_FORMAT_A8 

8-bit alpha-only pixel format.

BL_FORMAT_COUNT 

Count of pixel formats.

BL_FORMAT_RESERVED_COUNT 

Count of pixel formats (reserved for future use).

BLFormatFlags : uint32_tenum

Pixel format flags.

ConstantDescription
BL_FORMAT_FLAG_RGB 

Pixel format provides RGB components.

BL_FORMAT_FLAG_ALPHA 

Pixel format provides only alpha component.

BL_FORMAT_FLAG_RGBA 

A combination of BL_FORMAT_FLAG_RGB | BL_FORMAT_FLAG_ALPHA.

BL_FORMAT_FLAG_LUM 

Pixel format provides LUM component (and not RGB components).

BL_FORMAT_FLAG_LUMA 

A combination of BL_FORMAT_FLAG_LUM | BL_FORMAT_FLAG_ALPHA.

BL_FORMAT_FLAG_INDEXED 

Indexed pixel format the requres a palette (I/O only).

BL_FORMAT_FLAG_PREMULTIPLIED 

RGB components are premultiplied by alpha component.

BL_FORMAT_FLAG_BYTE_SWAP 

Pixel format doesn't use native byte-order (I/O only).

BL_FORMAT_FLAG_BYTE_ALIGNED 

Pixel components are byte aligned (all 8bpp).

BLImageCodecFeatures : uint32_tenum

Image codec feature bits.

ConstantDescription
BL_IMAGE_CODEC_FEATURE_READ 

Image codec supports reading images (can create BLImageDecoder).

BL_IMAGE_CODEC_FEATURE_WRITE 

Image codec supports writing images (can create BLImageEncoder).

BL_IMAGE_CODEC_FEATURE_LOSSLESS 

Image codec supports lossless compression.

BL_IMAGE_CODEC_FEATURE_LOSSY 

Image codec supports loosy compression.

BL_IMAGE_CODEC_FEATURE_MULTI_FRAME 

Image codec supports writing multiple frames (GIF).

BL_IMAGE_CODEC_FEATURE_IPTC 

Image codec supports IPTC metadata.

BL_IMAGE_CODEC_FEATURE_EXIF 

Image codec supports EXIF metadata.

BL_IMAGE_CODEC_FEATURE_XMP 

Image codec supports XMP metadata.

BLImageInfoFlags : uint32_tenum

Flags used by BLImageInfo.

ConstantDescription
BL_IMAGE_INFO_FLAG_PROGRESSIVE 

Progressive mode.

BLImageScaleFilter : uint32_tenum

Filter type used by BLImage::scale().

ConstantDescription
BL_IMAGE_SCALE_FILTER_NONE 

No filter or uninitialized.

BL_IMAGE_SCALE_FILTER_NEAREST 

Nearest neighbor filter (radius 1.0).

BL_IMAGE_SCALE_FILTER_BILINEAR 

Bilinear filter (radius 1.0).

BL_IMAGE_SCALE_FILTER_BICUBIC 

Bicubic filter (radius 2.0).

BL_IMAGE_SCALE_FILTER_BELL 

Bell filter (radius 1.5).

BL_IMAGE_SCALE_FILTER_GAUSS 

Gauss filter (radius 2.0).

BL_IMAGE_SCALE_FILTER_HERMITE 

Hermite filter (radius 1.0).

BL_IMAGE_SCALE_FILTER_HANNING 

Hanning filter (radius 1.0).

BL_IMAGE_SCALE_FILTER_CATROM 

Catrom filter (radius 2.0).

BL_IMAGE_SCALE_FILTER_BESSEL 

Bessel filter (radius 3.2383).

BL_IMAGE_SCALE_FILTER_SINC 

Sinc filter (radius 2.0, adjustable through BLImageScaleOptions).

BL_IMAGE_SCALE_FILTER_LANCZOS 

Lanczos filter (radius 2.0, adjustable through BLImageScaleOptions).

BL_IMAGE_SCALE_FILTER_BLACKMAN 

Blackman filter (radius 2.0, adjustable through BLImageScaleOptions).

BL_IMAGE_SCALE_FILTER_MITCHELL 

Mitchell filter (radius 2.0, parameters 'b' and 'c' passed through BLImageScaleOptions).

BL_IMAGE_SCALE_FILTER_USER 

Filter using a user-function, must be passed through BLImageScaleOptions.

BL_IMAGE_SCALE_FILTER_COUNT 

Count of image-scale filters.

Variable Documentation

const BLFormatInfo blFormatInfo[BL_FORMAT_RESERVED_COUNT]

Pixel format information of Blend2D native pixel formats, see BLFormat.