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

Function loadData

source/ui/utils/readIcons.cpp:312–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312std::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
323static void flipBitmap(unsigned char* data, int stride, int height) {
324 int i1 = 0;

Callers 1

parseIconFunction · 0.85

Calls 4

kwarnFunction · 0.85
flipBitmapFunction · 0.85
readMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected