* @addtogroup dali_core_images
* @{
*/
-
+
/**
* @brief Pixel format types and their properties.
* @since_tizen 2.4
/**
* @brief Pixel formats
*
- * @note: BufferImage::Update might not work with BGR/BGRA formats!
+ * Pixel format, default color depth is RGBA 32 bit with alpha
* @since_tizen 2.4
+ * @note BufferImage::Update might not work with BGR/BGRA formats!
*/
-enum Format ///< pixel format, default color depth is RGBA 32 bit with alpha
+enum Format
{
// Start at > 0 to distinguish null data:
- A8 = 1, ///< color depth 8-bit, alpha
- L8, ///< color depth 8-bit, luminance
- LA88, ///< color depth 16-bit, luminance with 8 bit alpha
- RGB565, ///< color depth 16 bit, 5-6-5
- BGR565, ///< color depth 16 bit, 5-6-5
- RGBA4444, ///< color depth 16 bit with alpha, 4-4-4-4
- BGRA4444, ///< color depth 16 bit with alpha, 4-4-4-4
- RGBA5551, ///< color depth 16 bit with alpha, 5-5-5-1
- BGRA5551, ///< color depth 16 bit with alpha, 5-5-5-1
- RGB888, ///< color depth 24 bit, 8-8-8
- RGB8888, ///< color depth 32 bit, alpha is reserved but not used, 8-8-8-8#
- BGR8888, ///< color depth 32 bit, alpha is reserved but not used, 8-8-8-8#
- RGBA8888, ///< color depth 32 bit with alpha, 8-8-8-8
- BGRA8888, ///< color depth 32 bit with alpha, 8-8-8-8
+ A8 = 1, ///< color depth 8-bit, alpha @since_tizen 2.4
+ L8, ///< color depth 8-bit, luminance @since_tizen 2.4
+ LA88, ///< color depth 16-bit, luminance with 8 bit alpha @since_tizen 2.4
+ RGB565, ///< color depth 16 bit, 5-6-5 @since_tizen 2.4
+ BGR565, ///< color depth 16 bit, 5-6-5 @since_tizen 2.4
+ RGBA4444, ///< color depth 16 bit with alpha, 4-4-4-4 @since_tizen 2.4
+ BGRA4444, ///< color depth 16 bit with alpha, 4-4-4-4 @since_tizen 2.4
+ RGBA5551, ///< color depth 16 bit with alpha, 5-5-5-1 @since_tizen 2.4
+ BGRA5551, ///< color depth 16 bit with alpha, 5-5-5-1 @since_tizen 2.4
+ RGB888, ///< color depth 24 bit, 8-8-8 @since_tizen 2.4
+ RGB8888, ///< color depth 32 bit, alpha is reserved but not used, 8-8-8-8# @since_tizen 2.4
+ BGR8888, ///< color depth 32 bit, alpha is reserved but not used, 8-8-8-8# @since_tizen 2.4
+ RGBA8888, ///< color depth 32 bit with alpha, 8-8-8-8 @since_tizen 2.4
+ BGRA8888, ///< color depth 32 bit with alpha, 8-8-8-8 @since_tizen 2.4
// GLES 3 Standard compressed formats:
- COMPRESSED_R11_EAC, ///< ETC2 / EAC single-channel, unsigned
- COMPRESSED_SIGNED_R11_EAC, ///< ETC2 / EAC single-channel, signed
- COMPRESSED_RG11_EAC, ///< ETC2 / EAC dual-channel, unsigned
- COMPRESSED_SIGNED_RG11_EAC, ///< ETC2 / EAC dual-channel, signed
- COMPRESSED_RGB8_ETC2, ///< ETC2 / EAC RGB
- COMPRESSED_SRGB8_ETC2, ///< ETC2 / EAC RGB using sRGB colourspace.
- COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, ///< ETC2 / EAC RGB with single bit per pixel alpha mask.
- COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,///< ETC2 / EAC RGB using sRGB colourspace, with single bit per pixel alpha mask.
- COMPRESSED_RGBA8_ETC2_EAC, ///< ETC2 / EAC RGB plus separate alpha channel.
- COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, ///< ETC2 / EAC RGB using sRGB colourspace, plus separate alpha channel.
+ COMPRESSED_R11_EAC, ///< ETC2 / EAC single-channel, unsigned @since_tizen 2.4
+ COMPRESSED_SIGNED_R11_EAC, ///< ETC2 / EAC single-channel, signed @since_tizen 2.4
+ COMPRESSED_RG11_EAC, ///< ETC2 / EAC dual-channel, unsigned @since_tizen 2.4
+ COMPRESSED_SIGNED_RG11_EAC, ///< ETC2 / EAC dual-channel, signed @since_tizen 2.4
+ COMPRESSED_RGB8_ETC2, ///< ETC2 / EAC RGB @since_tizen 2.4
+ COMPRESSED_SRGB8_ETC2, ///< ETC2 / EAC RGB using sRGB colourspace. @since_tizen 2.4
+ COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, ///< ETC2 / EAC RGB with single bit per pixel alpha mask. @since_tizen 2.4
+ COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,///< ETC2 / EAC RGB using sRGB colourspace, with single bit per pixel alpha mask. @since_tizen 2.4
+ COMPRESSED_RGBA8_ETC2_EAC, ///< ETC2 / EAC RGB plus separate alpha channel. @since_tizen 2.4
+ COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, ///< ETC2 / EAC RGB using sRGB colourspace, plus separate alpha channel. @since_tizen 2.4
// GLES 2 extension compressed formats:
- COMPRESSED_RGB8_ETC1, ///< ETC1 RGB as defined by GLES 2 extension OES_compressed_ETC1_RGB8_texture: http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt
- COMPRESSED_RGB_PVRTC_4BPPV1 ///< PowerVR 4bpp RGB format (v1) as defined by extension IMG_texture_compression_pvrtc: http://www.khronos.org/registry/gles/extensions/IMG/IMG_texture_compression_pvrtc.txt
+ COMPRESSED_RGB8_ETC1, ///< ETC1 RGB as defined by GLES 2 extension OES_compressed_ETC1_RGB8_texture: http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt @since_tizen 2.4
+ COMPRESSED_RGB_PVRTC_4BPPV1 ///< PowerVR 4bpp RGB format (v1) as defined by extension IMG_texture_compression_pvrtc: http://www.khronos.org/registry/gles/extensions/IMG/IMG_texture_compression_pvrtc.txt @since_tizen 2.4
///! Update LAST_VALID_PIXEL_FORMAT below if you add an enum value here.
};
* @brief Whether specified pixel format contains an alpha value.
*
* @since_tizen 2.4
- * @param [in] pixelformat pixel format
- * @return true if format has alpha, false otherwise
+ * @param [in] pixelformat Pixel format
+ * @return True if format has alpha, false otherwise
+ *
*/
DALI_IMPORT_API bool HasAlpha(Format pixelformat);
* @since_tizen 2.4
* @param [in] pixelFormat The pixel format
* @return The number of bytes per pixel
+ *
*/
DALI_IMPORT_API unsigned int GetBytesPerPixel(Format pixelFormat);
/**
* @brief Returns the offset of the byte containing the alpha value from the start of the pixel data
* and the bitmask of that byte to get the alpha value.
- * For example, in case of RGBA4444, byteOffset value is 1 and bitMask value is 0x0f.
+ *
+ * For example, in case of Pixel::RGBA4444, byteOffset value is 1 and bitMask value is 0x0f.
* It means the second byte contains the alpha value and the last 4 bits of the byte is the alpha value.
*
* Bitmask is zero if the pixelFormat does not support alpha
* @since_tizen 2.4
- * @param[in] pixelFormat the pixel format
- * @param[out] byteOffset the byte offset of the byte containing the alpha value
- * @param[out] bitMask the bitmask of the byte to get the alpha value
+ * @param[in] pixelFormat The pixel format
+ * @param[out] byteOffset The byte offset of the byte containing the alpha value
+ * @param[out] bitMask The bitmask of the byte to get the alpha value
+ *
*/
DALI_IMPORT_API void GetAlphaOffsetAndMask(Format pixelFormat, int& byteOffset, int& bitMask);