Add new comment

Is out_rgb matrix invertible?

out_rgb[output_color-1] is the matrix for converting from sRGB to the chosen output space (see "convert_to_output_rgb").

If I take out_rgb[output_color-1] and invert it (using the dcraw function pseudoinverse) ,I shoul a get a matrix able totake a pixel back to sRGB from the output space.

So I take all the output pixels and perform vector by matrix multiply for each of them, expecting to get back the sRGB image.
But it does not work , the image is obviously wrong no matter what algorithm for vector dot matrix multiply I use, where am I making a mistake? The math should be correct!