Write to RAW (DNG, CRW etc) in Natron?


I am trying to use a Read node for one DNG file, to write to another DNG file.

I have tried connecting a Read node of a DNG photo I took, to a Write node.

My DNG was created with a Canon Powershot S3 IS running CHDK (Canon Hack Development Kit).

I have also tried writing a DNG from a Read node of other RAW digital files, including sample DNGs from KenRockwell.com, and RawSamples.ch, and I have tried writing to other RAW filetypes, such as CR2 and CRW.

When I render from the Write to RAW node, I get an error:

Write1 error: Cannot create output file /path/to/file.dng

Writing to EXR works, and seems to not lose visual information in the resulting file, but creates undesirably large files compared to the original DNG’s filesize.

I would like to eventually batch fix some DNGs with artifacts and errors, then manually edit the written DNGs in darktable, but must figure figure out how, or even if, I can even write a DNG, or other RAW file, from Natron in the first place.

Perhaps there is a step between the Read node and Write node that I am missing?
Or a very specific combination of settings, in the Read node, or the Write node, or both?

I am running Natron 2.3.14, on Linux Mint 17.2 “Rafaela” (Based on Ubuntu 14.04 “Trusty”) 64-Bit.

I am not fully versed in either compositing or RAW photography, so I apologise in advance if I do not fully understand questions about or solutions to my problem.

You cannot write a camera raw file in Natron, since Natron is not a camera. What exactly do you want to achieve that way? Do you want to re-apply the camera defects, re-mosaic the image, and then write it so that the next software thinks it comes directly from the camera?
There’s no such thing in Natron, sorry.

In the meantime, you can:

Next version of Natron will also support HEIF/HEIC: https://fr.wikipedia.org/wiki/High_Efficiency_Image_File_Format


Even in a photographic sense, writing a raw file that didn’t come from some sort of phycial sensor just doesn’t happen


My apologies, I must have misremembered the WriteOIIO and ReadOIIO doc pages and confused the features of one with the other, on top of my existing misunderstanding of the fundamental nature of RAW files.

Thank you both for clearing things up, and thank you Devernay for the multiple present and even future solutions.

1 Like

No problem! Did you have success with one of the HDR formats I mentioned?

1 Like

I settled on writing .HDR files, but have managed to partly solve my problem (dead and hot pixels visible in DNG files) with a dedicated CHDK tool that can handle the RAW data, fix the bad pixels, and output to DNG. So I should be okayish for now.

I am probably missing many other obvious or fundamental concepts in my process, but hope to keep learning as I go.