encodeImage method
Encode a single image.
Implementation
@override
List<int> encodeImage(Image image) {
final out = OutputBuffer();
_writeHeader(out);
_writeImage(out, image);
out.writeUint32(0); // no offset to the next image
return out.getBytes();
}