Created attachment 61527 [details] histmatch.py Version: 2.0.0 (using KDE 4.6.4) OS: Linux A Feature that could be really interesting to have is to apply to raw files the operations the camera would have used to create the jpeg. To make this possible cameras save in exif binary chunk of data, in scattered proprietary formats, thus making support of this feature to support very difficult outside programs of the vendor (i.e Nikon Capture NX) There is another way, cameras often save preview and also full jpeg (nef 12 bit compressed fex) in the raw file, this file is worked by the camera and show evident differences to the raw. The idea is to try to re-create the histogram of the jpeg onto the raw. Fred Weinhaus did exactly that using imagemagick's `convert` http://www.fmwconcepts.com/imagemagick/histmatch/index.php The attached python script is a conversion of his histmatch bash one. The linked page has a good description of how it work. There is a bug preventing images of different sizes to work, but as a proof of concept it should be enough ;) it's called like `histmatch.py -c luminance preview.jpg 16bit.png 16bit_out.png` the "scatteer" script on the same site can be used to analize results. While this approach can and should be perfected it has already good results So it would be interesting to have a similar feature in the batch conversion P.S. a way to make it better could possibly involve hald maps for 3d clut, need more investigation P.P.S I'll look at this in depth after my short holidays i.e. after July 10 Reproducible: Didn't try Expected Results: better camera/digikam match of produced images
*** Bug 277707 has been marked as a duplicate of this bug. ***
Francesco, The idea of this entry is very interesting. I would you like to see a C++ implementation which : 1/ extract JPEG preview from RAW (easy to do with libkdcraw API) 2/ Analyse JPEG image and compute settings to apply on RAW image data as post processing 3/ Perform post processing to RAW using standard Digikam filters Are you interested to work on this project ? Gilles Caulier