A simple C++20 implementation of the qoi format
fileInputStream is("input.qoi");
uint8_t* pixels = qoi::decode(is, &width, &height, &channels, &colorspace);
is.close();
fileOutputStream os("output.qoi");
qoi::encode(os, pixels, width, height, channels);
os.flush();
os.close();