rawdata - make a TIFF from your raw file, no processing

I wrote the program a few weeks ago, and I had little to do on this snowy Colorado day, so I cleaned it up and posted to GitHub:

Compiling: If you’re using a Debian, sudo apt-get install libraw-dev libtiff5-dev will get the required libraries. MSYS2 on Windows, don’t know yet (too lazy to power up the Surface 3 sitting right there… )

rawdata.cpp: 'bout as simple as I could make it, uses only libraw and libtiff, and the Makefile should handle any Linux (Ubuntu-tested) or MSYS2 on Windows (not tested yet). If Windows, you’ll need to uncomment a couple of lines in the Makefile.

raw2tiff.sh: Uses rawdata and exiftool to make a TIFF from a raw file, copy the raw file metadata to the TIFF, and if a .icc profile is specified as the third argument, also inserts that into the TIFF.

Note that the “image” is the raw data, no processing at all. No demosaic, no white balance, no crop of the unexposed borders. I’ve opened one of these in rawproc and I can develop a usable image from it; you should be able to do something similar in G’MIC.

2 Likes

Is this similar to dcraw's document mode?

Oookay, previously I’ve not been able to get dcraw to not scale. I just re-tried it, and now the results are the same as rawdata:

dcraw -D -T -4 DSG_3111.NEF

works just fine, now… :exploding_head:

Well, not identical; rawdata doesn’t clip the masked borders… :smile:

I will give it a try when I have the time to investigate. :slight_smile:

What are the advantages of converting a raw to a tiff? Would this be similar to creating a .dng file?

Mess with @Iain’s demosaic tests in G’MIC… ??

Edit: Practically, there’s no real advantage, the way raw processing and general image processing is factored. I just grow weary of reading all about ‘raw’ images as RGB on the internets, want to give a means for folk to regard ‘really raw’…