Added ASTC Native file format loader
[platform/core/uifw/dali-core.git] / dali / public-api / images / pixel.cpp
index 166d220..276e1c4 100644 (file)
@@ -89,6 +89,7 @@ bool Pixel::HasAlpha(Format pixelformat)
     case COMPRESSED_SRGB8_ETC2:
     case COMPRESSED_RGB8_ETC1:
     case COMPRESSED_RGB_PVRTC_4BPPV1:
+    case INVALID:
     {
       return false;
     }
@@ -170,6 +171,7 @@ unsigned int Pixel::GetBytesPerPixel(Format pixelFormat)
     case COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:
     case COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:
     case COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:
+    case INVALID:
     {
       DALI_LOG_ERROR("Pixel formats for compressed images do not have meaningful integer bits per pixel values.\n");
       return 0;
@@ -272,6 +274,7 @@ void Pixel::GetAlphaOffsetAndMask(Format pixelFormat, int& byteOffset, int& bitM
     case COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:
     case COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:
     case COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:
+    case INVALID:
     {
       DALI_LOG_ERROR("Pixel formats for compressed images are not compatible with simple masking-out of per-pixel alpha.\n");
       byteOffset=0;