MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / IdentifyImage

Function IdentifyImage

LibLemon/include/lemon/gfx/graphics.h:76–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers 1

LoadImageFunction · 0.85

Calls 2

IsBMPFunction · 0.85
IsPNGFunction · 0.85

Tested by

no test coverage detected