Ok, thanks, your function is the mapping I was looking for. This doesn’t require higher-precision integers for the conversion.
But still, I’d like to know if there is a fundamental limitation in Matrix{Gray{Fixed}}
or one just needs to write the code needed to convert the matrix to PNG.