Jump to content

DNG to TIFF conversion


david_barts2

Recommended Posts

From the reading I had done, DNG files seemed basically like a close variant of TIFF, so I quite naively

assumed that converting from one format to another would be straightforward and unambiguous.

<p>

Apparently, not so. I have a version of Photoslop old enough not to recognize DNG files or to work with

any of the Adobe plug-ins for such files. But, the Pentax-supplied Photolab software recognizes such files,

as somewhat surprisingly, does the Apple-supplied Preview utility. And both applications let the file be

saved as a 16-bit TIFF.

<p>

<em>Diffferent</em> 16-bit TIFF files, it turns out. The sizes don't even match!

<p>

And the files do indeed appear to be different. The colors in the Photolab-converted one seem to be

much more saturated than the ones in the Preview-converted one. Interesting.

<p>

Also interesting (i.e. somewhat unexpected) is that when I load the Preview-generated TIFF in Photoshop,

I get a warning about a color space mismatch and am asked if I want to ignore it, convert the document to

match the local colorspace, or use the document colorspace. I guess that means Photolab is already doing

that conversion.

<p>

The surprising part is that the results are the same (a washed-out image with very unsaturated colors) if I

choose to use the document colorspace or to simply discard the colorspace information! I would have

guessed that both the convert and use-docoment-colorspace options would generate the same results on

my monitor, with the only difference being how the file is saved, and that ignoring the colorspace would

result in the odd one out, but strangely not.

<p>

I'm going to try and attach JPEG images generated in Photoshop with identical options but with the

different ways of opening the TIFF data to show what I mean. It's all rather disappointing -- I was

expecting everything to default the same way. I guess I was naïve.<div>00Ou0p-42486384.jpg.4fcd3035367d13babb57a2f1103cfa34.jpg</div>

Link to comment
Share on other sites

OK, that didn't work, so I'll just put 'em on the Web and link from here.

<p align="center">

<img src="http://homepage.mac.com/n5jrn/photo_net/preview-con.jpg">

<br>

<i>DNG - Preview - TIFF - Photoshop (convert colorspace) - JPEG</i></p>

<p align="center">

<img src="http://homepage.mac.com/n5jrn/photo_net/preview-dis.jpg">

<br>

<i>DNG - Preview - TIFF - Photoshop (discard or use document colorspace) -

JPEG</i></p>

Link to comment
Share on other sites

David,

TIFF is basically a "container format" for images that can hold a bunch of different stuff (raw image sensor data, uncompressed RGB data, JPEG compressed data, etc.).

 

DNG is in fact a TIFF_based format, it uses TIFF as a container. But it stores raw sensor data rather than the compressed RGB data of "typical" TIFF files.

 

Since TIFF is such a broad format, most programs can only understand a limited subset of TIFFs. Your version of PhotoShop obviously doesn't do DNG. I am often amazed to hear what hassles Mac and Windows users have with RAW images. Use DCRaw or one of its GUI frontends (http://en.wikipedia.org/wiki/Dcraw#GUI_frontends) and you'll never have such hassles... it's open-source and reads every RAW format ever invented, essentially, and in many cases does it better than the manufacturer's software!

Link to comment
Share on other sites

Dave, I'm not exactly sure what you are asking, so if this is way off base then just disregard it.

 

Everything on a PC (for instance) is defaulted to sRGB, everything on the web is defaulted to sRGB. The reason, the web consortiums decided that 8bit JPEG was the standard since an 8bit sRGB file that was properly processed, can give a fairly accurate representation of your image, and of course is "portable". it's also because many monitors and graphics cards in the olden days couldn't display wide gammuts.

 

Coincidentally it's also what most comcerial continuous toned printers use as a colorspace.

 

Now Apple came along and decided to mess up what was a good system with the "color" recognition of the Safari browser. Basically they solved a problem that didn't exist.

 

The reason why the problem didn't exist, is because if you followed the rules, and posted your web jpegs as 8 bit JPEG, with sRGB color space everyone saw your images (assuming they have a calibrated monitor) as you edited them.

 

However, the people going gaga for web colorspace management were the idiots posting AdobeRGB or ProPhoto colorspaces to the web. Now they say things like "Wow, for the first time my images can be seen in all their glory, as I intended them."

 

The truth is 8 bit files really don't benefit a whole lot from the larger color spaces, so the photos really just look about as good as if they were posted in sRGB.

 

----------------

 

So now back to your question. As I aforementioned the default color space on most programs (including but not limited to web browsers) including image viewers, is sRGB. So if you output you DNG/PEF files to AdobeRGB, and you viewer is either not color space aware, or you have it set to default to sRGB you will get washed out colors.

 

Photolab has in the preferences to use the camera default space (the one you set), or to use sRGB or AdobeRGB. You need to make sure the preferences have the files being saved at whatever space you want.

 

Now with older versions of photoshop (i have CS), when you import it should tell you that you have a working and document colorspace mismatch. You should either change your working colorspace in the preferences to the prefered space, or when you import have the files converted to the working color space. However, I see no point to importing into Photoshop with AdobeRGB and then immediately converting to sRGB. So therefore, with work from the start in sRGB, or set AdobeRGB as your working color space.

 

Also, if you convert a TIFF to a Web JPEG in Photoshop and don't FIRST change the color space to sRGB you will get washed out images.

 

Finally, don't forget to convert your web jpegs to sRGB before saving and posting to the web. Unless anyone actually uses the crappy safari browser when really good browsers like Firefox, Opera, and Flock (Firefox based) are avail you are setting your images up to look poorly to the vast majority of viewers.

Link to comment
Share on other sites

That's quite helpful.

 

Though it appears that Pentax Photolab *is* actually converting the colorspace to the system one, since the TIFF generated via that program doesn't generate the mismatch warning (it's the Preview-generated TIFF that does).

 

Apparently Photoslop 7 is rather dense when it comes to saving things. One would think that a "save for web" option would convert things from the current colorspace being used (whatever it is) to sRGB, since that's the de-facto web-standard. I guess not.

 

I had sometimes wondered why "save for web" seemed to generate washed-out images. Now I know.

Link to comment
Share on other sites

Additionally, I would not expect TIFF's generated by two different RAW converters to be the same anyway, even if they happened to use similar TIFF formats. The DNG RAW data does not contain a recognizeable image until the RAW processor renders one, so different RAW processors will come up with different results.

 

As for dcraw, my impression is that many Windows and Mac packages also use it in some form though the bundled dcraw with various packages may not be up-to-date or the vendor may not have created profiles for various cameras yet that integrate their software with the underlying dcraw library. A good example of this is that Apple didn't support *ist DS2 or *ist DL2 until extremely recently even though they do support the extremely similar DS & DL. In fact you could edit the first line of the RAW file, replace "DS2" with "DL " and then iPhoto, etc. could open the file. So in some cases it isn't a RAW format-handling issue as much as the logic that integrates and controls the converter.

Link to comment
Share on other sites

GLad it was helpful. When I first started processing RAW I too was getting washed out JPEGs. I assumed, and still do wonder why, that when converting to web, it was saving at the web consortiums default color space. It's not really big deal to just remember to convert to sRGB once you realize this, but still it seems it would be a preference you could either save, or a program default.

 

Image processing in some ways is just as much of a skill as taking a good photo. Even basic things like posting to the web seem to take more effort than one would imagine.

Link to comment
Share on other sites

After banging my head against the wall some more (it's not so simple: Photoshop 7's "Save for Web" option is making files that look washed-out and sh*tty as well, even when I'm in the sRGB colorspace), I've pretty much come to the conclusion that I'm also dealing with some Mac color management bugs as well.

 

In particular, JPEGs with no profile are NOT displayed correctly on the Mac; it simply ships the bits over to the monitor with no colorspace conversion at all. (Yes, any documentation that talks about "sRGB" or "Generic RGB" being the default for such files is incorrect.)

 

I'm not the only one to notice this, either. Go here:

http://www.photo.net/bboard/q-and-a-fetch-msg?msg_id=00DRb6

and read Eric Perlberg's comment dated Sep 05, 2005; 05:46 p.m. and Elliot N's comment immediately above it.

 

Basically, the only way that honors the quirks of both Mac (broken color management) and Windoze (no color management) is to forget about using "Save for Web" (which generates files stripped of any color profile), make sure the document is in sRGB (aka "sRGB IEC61966-2.1") color space, and "Save As..." a JPEG document.

 

That will create an sRGB file with embedded sRGB profile that will display as good as possible in either Mac/Safari or Windoze/Explorer/Firefox. It fails to display properly on the Mac/Explorer (and presumably Mac/Firefox) browser combinations, but that's the nature of bugs for you: they can't always be fully worked around. Sigh.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...