#pragma once #include "image_file.h" namespace roro::files { // A PNG, decoded a row at a time (issue #45): every colour type and bit depth, not interlaced. // Pixels that are mostly transparent are not handed on. `rowNeeded` lets rows be left out (they // are still decoded: a row is stored as its difference from the one before); `enough` says that // from this row on nothing is wanted, and the decoding stops there. // // Memory while it runs: the window the file's compression refers back into (what its header asks // for, 32 KB at most), two rows of the picture, and about 3 KB. The display library's decoder // wanted 44 KB in one block, which this device often doesn't have. // // "" or why it can't be shown. std::string readPng(const ImageRead& read, uint32_t size, const ImagePixels& pixels, const std::function& rowNeeded = nullptr, const std::function& enough = nullptr); } // namespace roro::files