* @{
*/
//Keeping all the enum names of Pixel in an array for Print Log
-string g_rgPixelEnumList[] = { "A8",
- "L8",
- "LA88",
- "RGB565",
- "BGR565",
- "RGBA4444",
- "BGRA4444",
- "RGBA5551",
- "BGRA5551",
- "RGB888",
- "RGB8888",
- "BGR8888",
- "RGBA8888",
- "BGRA8888",
- "COMPRESSED_R11_EAC",
- "COMPRESSED_SIGNED_R11_EAC",
- "COMPRESSED_RG11_EAC",
- "COMPRESSED_SIGNED_RG11_EAC",
- "COMPRESSED_RGB8_ETC2",
- "COMPRESSED_SRGB8_ETC2",
- "COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",
- "COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",
- "COMPRESSED_RGBA8_ETC2_EAC",
- "COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",
- "COMPRESSED_RGB8_ETC1",
- "COMPRESSED_RGB_PVRTC_4BPPV1"
- };
+string g_rgPixelEnumList[] = {
+ "Pixel::INVALID",
+ "Pixel::L8",
+ "Pixel::RGB565",
+ "Pixel::RGB888",
+ "Pixel::RGB8888",
+ "Pixel::BGR8888",
+ "Pixel::BGR565",
+ "Pixel::COMPRESSED_R11_EAC",
+ "Pixel::COMPRESSED_SIGNED_R11_EAC",
+ "Pixel::COMPRESSED_RG11_EAC",
+ "Pixel::COMPRESSED_SIGNED_RG11_EAC",
+ "Pixel::COMPRESSED_RGB8_ETC2",
+ "Pixel::COMPRESSED_SRGB8_ETC2",
+ "Pixel::COMPRESSED_RGB8_ETC1",
+ "Pixel::COMPRESSED_RGB_PVRTC_4BPPV1",
+ "Pixel::A8", //[index=15] alpha true from here
+ "Pixel::LA88",
+ "Pixel::RGBA5551",
+ "Pixel::RGBA4444",
+ "Pixel::RGBA8888",
+ "Pixel::BGRA8888",
+ "Pixel::BGRA5551",
+ "Pixel::BGRA4444",
+ "Pixel::COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",
+ "Pixel::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",
+ "Pixel::COMPRESSED_RGBA8_ETC2_EAC",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",
+ "Pixel::COMPRESSED_RGBA_ASTC_4x4_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_5x4_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_5x5_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_6x5_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_6x6_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_8x5_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_8x6_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_8x8_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_10x5_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_10x6_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_10x8_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_10x10_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_12x10_KHR",
+ "Pixel::COMPRESSED_RGBA_ASTC_12x12_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR",
+ "Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"
+ };
// Keeping all the enums of Pixel in an array in an order so that first 14 enums do not have alpha channel and rest of them
// have alpha channel : According to help document
-Pixel::Format g_rgPixelFormatA[] = { Pixel::L8,
- Pixel::RGB565,
- Pixel::RGB888,
- Pixel::RGB8888,
- Pixel::BGR8888,
- Pixel::BGR565,
- Pixel::COMPRESSED_R11_EAC,
- Pixel::COMPRESSED_SIGNED_R11_EAC,
- Pixel::COMPRESSED_RG11_EAC,
- Pixel::COMPRESSED_SIGNED_RG11_EAC,
- Pixel::COMPRESSED_RGB8_ETC2,
- Pixel::COMPRESSED_SRGB8_ETC2,
- Pixel::COMPRESSED_RGB8_ETC1,
- Pixel::COMPRESSED_RGB_PVRTC_4BPPV1,
- Pixel::A8,
- Pixel::LA88,
- Pixel::RGBA5551,
- Pixel::RGBA4444,
- Pixel::RGBA8888,
- Pixel::BGRA8888,
- Pixel::BGRA5551,
- Pixel::BGRA4444,
- Pixel::COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
- Pixel::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
- Pixel::COMPRESSED_RGBA8_ETC2_EAC,
- Pixel::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
+Pixel::Format g_rgPixelFormatA[] = {
+ Pixel::INVALID,
+ Pixel::L8,
+ Pixel::RGB565,
+ Pixel::RGB888,
+ Pixel::RGB8888,
+ Pixel::BGR8888,
+ Pixel::BGR565,
+ Pixel::COMPRESSED_R11_EAC,
+ Pixel::COMPRESSED_SIGNED_R11_EAC,
+ Pixel::COMPRESSED_RG11_EAC,
+ Pixel::COMPRESSED_SIGNED_RG11_EAC,
+ Pixel::COMPRESSED_RGB8_ETC2,
+ Pixel::COMPRESSED_SRGB8_ETC2,
+ Pixel::COMPRESSED_RGB8_ETC1,
+ Pixel::COMPRESSED_RGB_PVRTC_4BPPV1,
+ Pixel::A8, //[index=15] alpha true from here
+ Pixel::LA88,
+ Pixel::RGBA5551,
+ Pixel::RGBA4444,
+ Pixel::RGBA8888,
+ Pixel::BGRA8888,
+ Pixel::BGRA5551,
+ Pixel::BGRA4444,
+ Pixel::COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+ Pixel::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
+ Pixel::COMPRESSED_RGBA8_ETC2_EAC,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
+ Pixel::COMPRESSED_RGBA_ASTC_4x4_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_5x4_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_5x5_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_6x5_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_6x6_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_8x5_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_8x6_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_8x8_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_10x5_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_10x6_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_10x8_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_10x10_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_12x10_KHR,
+ Pixel::COMPRESSED_RGBA_ASTC_12x12_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,
+ Pixel::COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,
};
int g_nPixelEnumSize = sizeof( g_rgPixelFormatA )/sizeof( g_rgPixelFormatA[0] );
+int g_nAlpha_Format_Start=15;
//Byte values are set according to help document
-unsigned int g_rgPixelBytePerPxl[] = { 1, 2, 3, 4, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 4, 4, 2, 2, 0, 0, 0, 0 };
+unsigned int g_rgPixelBytePerPxl[] = { 0,1,2,3,4,4,2,0,0,0,0,0,0,0,0,1,2,2,2,4,4,2,2,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+ };
// For testing purpose, ByteOffSet and BitMask values are set according to source file as no information is given in help document
-int g_rgPixelByteOffset[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 3, 1, 1, 0, 0, 0, 0 };
-int g_rgPixelBitMask[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xff, 0x01, 0x0f, 0xff, 0xff, 0x01, 0x0f, 0, 0, 0, 0 };
+int g_rgPixelOffSetAndMask[][2] = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {0,0xff},{1,0xff},{1,0x01},{1,0x0f},{3,0xff},{3,0xff},{1,0x01},{1,0x0f},{0,0},{0,0},{0,0},
+ {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}
+ };
/**
* @function PixelSetGetforImageAttributes