| 74 | bool IsPNG(const void* data); |
| 75 | |
| 76 | static inline int IdentifyImage(const void* data){ |
| 77 | int type = 0; |
| 78 | |
| 79 | if(IsBMP(data)){ |
| 80 | type = Image_BMP; |
| 81 | } else if (IsPNG(data)){ |
| 82 | type = Image_PNG; |
| 83 | } else type = Image_Unknown; |
| 84 | |
| 85 | return type; |
| 86 | } |
| 87 | |
| 88 | static inline uint32_t AlphaBlend(uint32_t oldColour, uint8_t r, uint8_t g, uint8_t b, double opacity){ |
| 89 | int oldB = oldColour & 0xFF; |