MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / LoadImageFromFile

Function LoadImageFromFile

source/ui/opengl/platformhelper.cpp:113–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113unsigned char* LoadImageFromFile(const char* filename, int* out_width, int* out_height)
114{
115 // Load from file
116 int image_width = 0;
117 int image_height = 0;
118 unsigned char* image_data = stbi_load(filename, &image_width, &image_height, nullptr, 4);
119 if (image_data == nullptr) {
120 return nullptr;
121 }
122 *out_width = image_width;
123 *out_height = image_height;
124
125 return image_data;
126}

Callers 2

getIconTextureMethod · 0.85
buildIconTextureMethod · 0.85

Calls 1

stbi_loadFunction · 0.85

Tested by

no test coverage detected