List<int> encodeHdrImage(HdrImage image) { final out = OutputBuffer(); _writeHeader(out); _writeHdrImage(out, image); out.writeUint32(0); // no offset to the next image return out.getBytes(); }