On schedule with the software and expect to have it ready within a few days from now.
Was struggling with the preview picture (embedded in the DNG).
Contrary to popular belief, that's not a JPG, but an uncompressed bitmap (at least in the M9 and M8 DNGs).
The problem was creating a new preview picture, based on the monochrome DNG.
That annoying little preview was perhaps the most complicated part of this whole project.
The difficulty sits in the fact that the preview picture is RGB, but the monochrome DNG only has one plane. That's a bit of a tricky conversion.
After a lot of effort it was still color (in the monochrome DNG), then it was just black - progress, at least the colors were gone! - then it turned red, then purple and then blue - colors back again, but not in the right order - seriously, this stuff isn't easy :-) - and then finally I had it monochrome.
But then it was linear monochrome, which means it was too dark.
Gives a weird effect when you import the DNG in Lightroom, since Lightroom first shows the preview - in the meantime interpolating the RAW. But with the monochrome DNG, interpolation isn't necessary, so loading is done quickly and there would be a strange flashy transition from dark to light. Didn't give a very stable impression, although there was nothing wrong with the DNG.
Anyway, those problems are solved.
Now I still have to solve the first and last 2 rows and columns of the photo, because those are skipped in the interpolation. The algorithm has to look around the pixel being interpolated, and that's not doable on the edges of the photo. In 'dcraw' that's solved by first applying a bilinear interpolation on those first/last two rows/columns.
I might try the same trick.
I also tried M8 DNGs, which are quite different from the M9 DNGs. Raw 8 bit data, in stead of the 14 bits of the M9, some different settings within the camera profile, and the preview picture - although also an uncompressed bitmap - is stored differently. I managed to get it to work, yet only tested with two M8 DNGs. But those two work perfectly.
The one thing I haven't tested yet are compressed DNGs (neither M9 nor M8), so that will be next.
Otherwise it's all coming together...
(...first screenshot now visible here)
No comments:
Post a Comment