0

Is there any way in python to save an image in DNG format?

I open a DNG image, do somne processing on it an would like to save it again as DNG.

There is for example rawpy but this just open a DNG file and I cannot save it back as DNG with this library (OpenCV doesn't work either.)

craaaft
  • 211
  • 1
  • 8
  • 1
    There is a way for saving image in DNG format using LIBTIFF as in the following [example](https://lab.apertus.org/T759). Using libtiff Python binding adds some challenges. I tried to solve the following [question](https://stackoverflow.com/questions/69526257/reading-raw-image-with-libraw-and-converting-to-dng-with-libtiff), using Python, but I gave up. – Rotem Dec 06 '21 at 21:29
  • Ok I see. I was thinking since when processing dng to jpg/png the demosaicing algorithm will take place. After the demosaicing one can not really go back to the original image since it is a an interpolation step. Didn't look yet into your code but mabye you have some thoughts on it. – craaaft Dec 08 '21 at 10:14

0 Answers0