DNG files open as 16 bit monochrome rather than 24 bit colour

fiji

#1

Hi All

I wonder if someone can help me with this issue? The files open and convert just fine with other apps such a Free DNG convertor here:

and IrfanView here:

https://www.irfanview.com/

Although the above apps work, they are many times slower than imagej which I’d like to use for batch cropping and conversion to TIFF.

Thanks for reading…

Steve


#2

Steve,

You can open DNG image files using the ij-dcraw plugin (http://ij-plugins.sourceforge.net/plugins/dcraw/). You have control there, how the image is open. I assume that you want to open the raw version of the image before color is created (before debayering). You can do it using “Document Mode” options.

To convert that raw image to color, in ImageJ, you ca use DeBayer plugin (http://www.umanitoba.ca/faculties/science/astronomy/jwest/plugins.html or a newer one https://github.com/ij-plugins/ijp-DeBayer2SX/releases)

Jarek


#3

Hi Jarek

Thanks very much for your reply. The DCRAW plugin does indeed work, but I don’t think I explained what I was looking for:

I’m doing some stacking work and so have about 100 DNG images which I’d like to do File/Import Image Sequence, loading all the images into a stack. Then I’d like to crop the entire stack and then convert to TIFF and it’s the import feature that produces the mono 16 bit files.

So what I’m looking for is for file/import to produce the colour images or a method of processing the entire stack in one operation.

I hope this makes sense!

Steve


#4

Hi again @jpsacha

Well I’ve thought about what you said about DCRAW having a wrapper and had a play with the dcraw exe file and it’s pretty cool. From the command line you can read and convert with wild cards a bunch of DNGs to tif eg:

dcraw -T *.dng

So it got me thinking… Maybe I can write a script to read all the file names in a folder, pass each one to dcraw and then add it to a stack.

I have no idea how to do this, but I have written one script before and notice it’s pretty much java so hopefully it won’t be too painful.

Cheers

Steve