How do I directly change the color matrices and camera profile information for a DNG file? (This may be useful for others who get better calibrations for their cameras)
I used DNG4PS-2 to convert a bunch of JPEG/RAW files from my Powershot A590-IS to DNG files. Since there wasn't a color profile for the camera, I used the Powershot S5 IS profile as a rough, and ended up deleting the redundant CRW files. Unfortunately, that color calibration matrix is WAY off. Now, I have a rough color calibration matrix that I can use for converting NEW RAW files. I want to go back and overwrite the old color matrices with this one -- how can I?
If there isn't a program to do it, I'm familiar enough with binary and programming to write a one-shot for this. But, I can't understand where and how the matrices are stored. The DNG spec says the matrices are 3x3 arrays of type SRATIONAL (2 unsigned long ints describing a fraction in numberator-denominator order). It also says the tag for the color matrix 1 has a tag code 50721.
I believe the tags are supposed to be datatype int32, but I can't find any instances. I get numerous matching int16/uint16 hits, but they seem to be mostly random. Could it be the lossless compression on the DNG files isn't just applied to the sensor matrix?
:EDIT: Found it! Google "DngSetMatrix"