CoronaExternalBitmapFormat

Revision Release 2024.3703
Keywords iOS, Solar2D Native, C, CoronaGraphics.h, CoronaExternalBitmapFormat
See also CoronaGraphics.h
Corona C Functions

Overview

Enumerated type describing the pixel format of the bitmap. Bitmap channels are (from left to right) MSB to LSB. Using RGBA as an example, A is in the least-significant 8 bits.

Note

RGBA format uses premultiplied alpha. This means that if the "raw" values of the channels are r, g, b, and a, the red channel will be r*(a/255).

Constants

This enum provides the following constants:

Important
  • The width of kExternalBitmapFormat_Mask and kExternalBitmapFormat_RGB bitmaps must be a multiple of 4. If the width is not a multiple of 4, the mask will create visual artifacts, and RGB will be treated as RGBA on Windows.

  • When using kExternalBitmapFormat_RGBA, the red, green, and blue channels must have premultiplied alpha.