| 310 | } |
| 311 | |
| 312 | std::shared_ptr<U8> loadData(BitmapInfoHeader& bih, BReadFile& f, int stride) { |
| 313 | if (bih.biCompression != 0) { // BMP_NO_COMPRESSION |
| 314 | kwarn("Compressed icon was not handled"); |
| 315 | return nullptr; |
| 316 | } |
| 317 | int dataSize = bih.biHeight * stride; |
| 318 | std::shared_ptr<U8> data = std::make_shared<U8>(dataSize); |
| 319 | f.read(data.get(), dataSize); |
| 320 | return data; |
| 321 | } |
| 322 | |
| 323 | static void flipBitmap(unsigned char* data, int stride, int height) { |
| 324 | int i1 = 0; |
no test coverage detected