| 111 | } |
| 112 | |
| 113 | unsigned 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 | } |
no test coverage detected