Also, I removed the raw output format. The uncompressed TIFF output is sufficient to obtain the logical pixel data in a reliable manner, just using margin 0 and module pixels 1. I placed the image at the end of the file at a fixed offset, with the offset published from the tiff class header. Of course one can also use the API directly as well.