Fixing the Leica M240 green shadows | Jonathan Perkins

The idea

Now its perfectly possible to adjust an individual image in Lightroom or Photoshop to tune out the green cast reasonably effectively, however because this correction is occurring after the image has been demosaiced (and the non-linear gain error occurs in the mosaic data), you need different adjustments for each image. Inspired by Jim’s work I realised that if one could apply gain correction to the mosaic data in the raw file it should be possible to correct all images with one set of adjustments. This means in theory I could simply preprocess any files that were going to be significantly pushed or shadow recovered and not have to make individual colour correction adjustments on each image. Luckily, processing M240 raw files is made a bit easier by the fact that the M240 uses the DNG format and Adobe make a source code DNG library available free in order to encourage adoption of the DNG format. So its possible to write a program that reads a M240 raw file, applies linearisation corrections each channel and then writes an output DNG file ready to load into Lightroom……

Source: blog.perkins.org.uk