Questions about raw, tiff, jpeg, and DNG

Started Mar 27, 2013 | Questions
clear glass
Contributing MemberPosts: 657
Like?
Questions about raw, tiff, jpeg, and DNG
Mar 27, 2013

I know raw is just the data.

Here's my question. Specifically, I'm shooting raw with Olympus cameras XZ1, XZ2, and E-LP5.

If I translate the raw into tiff or JPEG with the Olympus Viewer, I have the option to work on it (change contrast, color balance, etc.) before the translation to tiff or JPEG is complete.

Here's my question: Am I losing raw data (information) if I make no changes during translation; will there be less flexibility once the file comes out of Olympus Viewer as a tiff or JPEG? To work on a tiff or JPEG, I currently use Elements 6.

I also know that JPEG changes do entail loss of raw information each time the file is saved; is there any of this in tiff?

Is DNG superior to tiff for keeping possibilities for development?

I'd also appreciate knowing if what I think I know is right.

ANSWER:
This question has not been answered yet.
Olympus XZ-1
If you believe there are incorrect tags, please send us this post using our feedback form.
Tom Axford
Contributing MemberPosts: 932
Like?
Re: Questions about raw, tiff, jpeg, and DNG
In reply to clear glass, Mar 27, 2013

clear glass wrote:

I know raw is just the data.

Here's my question. Specifically, I'm shooting raw with Olympus cameras XZ1, XZ2, and E-LP5.

If I translate the raw into tiff or JPEG with the Olympus Viewer, I have the option to work on it (change contrast, color balance, etc.) before the translation to tiff or JPEG is complete.

Here's my question: Am I losing raw data (information) if I make no changes during translation; will there be less flexibility once the file comes out of Olympus Viewer as a tiff or JPEG? To work on a tiff or JPEG, I currently use Elements 6.

Any program that converts RAW to a viewable image will throw away some of the data in the conversion process. That viewable image must be saved as a TIFF or JPEG normally. But most photographers who shoot in RAW like to keep the RAW images as well in case they want to go back and reprocess them as that may give slightly better quality than processing a saved TIFF or JPEG.

I also know that JPEG changes do entail loss of raw information each time the file is saved; is there any of this in tiff?

JPEG images incur a loss of information every time a JPEG is saved. This is because the JPEG is highly compressed and a little of the data is lost in the compression process - much less than you would expect because the algorithm used is extremely clever. How much is lost depends on the JPEG quality (usually a number 1 to 100 that you can set in the program that saves the JPEG).

TIFF images involve no compression and hence no loss of data occurs when the TIFF image is saved. If you want to save an image knowing that you will return to it to continue editing it, TIFF is much better (but the image file is a lot larger than a JPEG). When you read a TIFF file you get an image identical to the one you saved. This is not the case for JPEG.

Is DNG superior to tiff for keeping possibilities for development?

Not in terms of the data kept, but more programs know about DNG than some proprietary RAW formats, hence it may be better in the long term.

Reply   Reply with quote   Complain
coronawithlime
Senior MemberPosts: 1,669Gear list
Like?
Re: Questions about raw, tiff, jpeg, and DNG
In reply to Tom Axford, Mar 27, 2013

Tom Axford wrote:

"more programs know about DNG than some proprietary RAW formats, hence it may be better in the long term."

Quite possibly this is the appropriate answer.  Or not, depending.   Seems to me sorta like pay your money and take your chances.

Adobe would like to see this open source format adopted as a standard, and are working to advance the idea, but I see little evidence that Nikon for example has any inclination to participate long term.  It seems to me that the current raw formats will be around for a while and I believe that at least for my part the thing to do is keep the camera raw files and deal with the issue when the time comes.

At some point perhaps there will be no new software to view your raw file, or no suitable computer to run old software on, but I am postponing the issue until some clear future standard comes forward.  DNG may or may not be the one and I don't feel it necessary to decide right now.

You can certainly argue that converting to a "universal" format a little bit at a time would be less an imposition than having to do some kind of marithon last minute conversion of mountains of images, but I just can't seem to get myself motivated to adopt a format that may or may not end up being a perminant standard.

Regarding your other questions, I am in agreement with Mr. Axford in his response.

-- hide signature --

One day long ago, a sorcerer and a warrior did battle, as such things were commonplace in that age. Sometimes the sorcerer won, and the sum value of human abilities was improved some trifling amount. Sometimes the warrior won, and again the human race improved by some insignificant amount, for a sorcerer who can't defeat one miserable warrior is a poor sorcerer indeed.

Reply   Reply with quote   Complain
Hugowolf
Forum ProPosts: 10,998
Like?
Re: Questions about raw, tiff, jpeg, and DNG
In reply to Tom Axford, Mar 27, 2013

Tom Axford wrote:

JPEG images incur a loss of information every time a JPEG is saved.

This is a myth, and can easily be shown to be incorrect. If you an edit between saves, even a minor one pixel edit, then you can incur data losses at each save, but simply saving the file using the same compression and resolution parameters should not cause further data loss.

It is an easy, but tedious, test to do. And since I have seen the results before, I am not going to repeat it.

Take an image and open it in Photoshop. Save it as a Jpeg with whatever parameters you like. Make a duplicate of the image and save it with the same parameters, then hit ctrl+shift+S (save as, then enter, enter, enter) a million times. Copy the millionaire duplicate onto the original as a layer and change the blending mode to difference. There should be no difference.

Brian A

Reply   Reply with quote   Complain
Tom Axford
Contributing MemberPosts: 932
Like?
Re: Questions about raw, tiff, jpeg, and DNG
In reply to Hugowolf, Mar 27, 2013

Hugowolf wrote:

Tom Axford wrote:

JPEG images incur a loss of information every time a JPEG is saved.

This is a myth, and can easily be shown to be incorrect. If you an edit between saves, even a minor one pixel edit, then you can incur data losses at each save, but simply saving the file using the same compression and resolution parameters should not cause further data loss.

It is an easy, but tedious, test to do. And since I have seen the results before, I am not going to repeat it.

Take an image and open it in Photoshop. Save it as a Jpeg with whatever parameters you like. Make a duplicate of the image and save it with the same parameters, then hit ctrl+shift+S (save as, then enter, enter, enter) a million times. Copy the millionaire duplicate onto the original as a layer and change the blending mode to difference. There should be no difference.

Brian A

There is no point whatsoever in loading and saving the same image many times in succession. Many programs are intelligent enough to realise this and keep the original image all the time, so they don't bother to do the reload (as the image has been kept in an internal buffer).

If, instead, you save the image, then quit the program, then restart it again and reload the saved JPEG, do a bit more editing and save again, and so on,... after a few cycles of this process you will begin to see a degradation in quality (more noticeable if you set a fairly low JPEG quality).

I learnt this myself the hard way - the loss of quality became very obvious after about 10 cycles of editing and saving. Always save as a TIFF if you want to continue editing later.

Reply   Reply with quote   Complain
Hugowolf
Forum ProPosts: 10,998
Like?
Re: Questions about raw, tiff, jpeg, and DNG
In reply to Tom Axford, Mar 27, 2013

Tom Axford wrote:

Hugowolf wrote:

Tom Axford wrote:

JPEG images incur a loss of information every time a JPEG is saved.

This is a myth, and can easily be shown to be incorrect. If you an edit between saves, even a minor one pixel edit, then you can incur data losses at each save, but simply saving the file using the same compression and resolution parameters should not cause further data loss.

It is an easy, but tedious, test to do. And since I have seen the results before, I am not going to repeat it.

Take an image and open it in Photoshop. Save it as a Jpeg with whatever parameters you like. Make a duplicate of the image and save it with the same parameters, then hit ctrl+shift+S (save as, then enter, enter, enter) a million times. Copy the millionaire duplicate onto the original as a layer and change the blending mode to difference. There should be no difference.

Brian A

There is no point whatsoever in loading and saving the same image many times in succession. Many programs are intelligent enough to realise this and keep the original image all the time, so they don't bother to do the reload (as the image has been kept in an internal buffer).

If, instead, you save the image, then quit the program, then restart it again and reload the saved JPEG, do a bit more editing and save again, and so on,... after a few cycles of this process you will begin to see a degradation in quality (more noticeable if you set a fairly low JPEG quality).

I learnt this myself the hard way - the loss of quality became very obvious after about 10 cycles of editing and saving. Always save as a TIFF if you want to continue editing later.

It has nothing to do with quitting and restarting the program, it is only the editing that matters. Photoshop won't let you save an unchanged image in the same format, the 'save as' actually saves over the old image file. You could write a script that openned, resaved, and closed several times. It will not have an effect on the image quality.

(And, there are lossy forms of TIFF).

Brian A

Reply   Reply with quote   Complain
clear glass
Contributing MemberPosts: 657
Like?
Thank you Tom Axford and all
In reply to Tom Axford, Mar 27, 2013

who supplemented or amended his information.

Reply   Reply with quote   Complain
clear glass
Contributing MemberPosts: 657
Like?
Question re. your comment on tiff.
In reply to Hugowolf, Mar 27, 2013

How do you know how lossy a particular tiff is?

Is it directly proportional to tiff size?

How do you even specify how much is lost by a lossy tiff?

Are dng's lossless?

(Did I hear someone snigger, The more you know, the more confused you can be?)

Reply   Reply with quote   Complain
Tom Axford
Contributing MemberPosts: 932
Like?
Re: Questions about raw, tiff, jpeg, and DNG
In reply to Hugowolf, Mar 27, 2013

Hugowolf wrote:

It has nothing to do with quitting and restarting the program, it is only the editing that matters. Photoshop won't let you save an unchanged image in the same format, the 'save as' actually saves over the old image file. You could write a script that openned, resaved, and closed several times. It will not have an effect on the image quality.

(And, there are lossy forms of TIFF).

Brian A

I've done some quick tests and I have to admit that you are correct if the image is not edited (or edited in ways that do not affect most of the image).  I think the JPEG algorithms have been improved over the years, because that wasn't the case many years ago when I first encountered this problem.

However, in some cases, the image quality still degrades each time you save a JPEG.

To illustrate this, I created an image of the text "AB" on a white background and saved it (at the lowest JPEG quality). I then reloaded the image, edited it (by slightly cropping the image size) and saved the result. This was repeated once more. The three saved images are shown below. You can see how the quality degrades further each time. I think this is because the slight cropping effectively changes the whole image so the JPEG algorithm compresses the image quite differently.

Reply   Reply with quote   Complain
Hugowolf
Forum ProPosts: 10,998
Like?
Re: Question re. your comment on tiff.
In reply to clear glass, Mar 27, 2013

clear glass wrote:

How do you know how lossy a particular tiff is?

It depends on the type of compression. TIFF isn’t really a file format, it is a wrapper class that allows for embedding images in several formats, in a somewhat similar fashion to PDF. So, from Photoshop, for example, you can save an image in TIFF using no compression, LZW (Lempel–Ziv–Welch, which is lossless), ZIP (which is lossless) or JPEG (which is lossy).

Are dng's lossless?

There are lossy DNG formats too.

Brian A

Reply   Reply with quote   Complain
Hugowolf
Forum ProPosts: 10,998
Like?
Re: Questions about raw, tiff, jpeg, and DNG
In reply to Tom Axford, Mar 28, 2013

Tom Axford wrote:

Hugowolf wrote:

It has nothing to do with quitting and restarting the program, it is only the editing that matters. Photoshop won't let you save an unchanged image in the same format, the 'save as' actually saves over the old image file. You could write a script that openned, resaved, and closed several times. It will not have an effect on the image quality.

(And, there are lossy forms of TIFF).

Brian A

I've done some quick tests and I have to admit that you are correct if the image is not edited (or edited in ways that do not affect most of the image).  I think the JPEG algorithms have been improved over the years, because that wasn't the case many years ago when I first encountered this problem.

The algorithms are pretty well defined and haven't changed.

However, in some cases, the image quality still degrades each time you save a JPEG.

To illustrate this, I created an image of the text "AB" on a white background and saved it (at the lowest JPEG quality). I then reloaded the image, edited it (by slightly cropping the image size) and saved the result.

Oh for sure, cropping will cause major recompression, much more so than most other forms of editing. The compression extent is generally based on 16 x 16 square pixel blocks, if you slice a pixel off the edge of one of those, then the whole image will be go through recompression. Edit pixels in the middle of a block, and any loss will generally be localized to that one block.

Which still doesn’t negate the fact that just repetitive saving does not cause data loss from a jpeg. If you are editing a jpeg image, then frequently saving the image while editing is not a good idea if you want to preserve quality.

Brian A

Reply   Reply with quote   Complain
Tom Axford
Contributing MemberPosts: 932
Like?
Re: Questions about raw, tiff, jpeg, and DNG
In reply to Hugowolf, Mar 28, 2013

Many thanks, Brian.

I hadn't realised before this discussion that JPEG compression algorithms are idempotent (if the parameters remain the same).

It has also prompted me to find out something about lossless JPEG editing - of limited practical value, I know, but it may come in handy one day.

On dpreview I learn something new almost every day!

Reply   Reply with quote   Complain
Jacques Cornell
Veteran MemberPosts: 3,163Gear list
Like?
Re: Questions about raw, tiff, jpeg, and DNG
In reply to clear glass, Mar 28, 2013

clear glass wrote:

I know raw is just the data.

Here's my question. Specifically, I'm shooting raw with Olympus cameras XZ1, XZ2, and E-LP5.

If I translate the raw into tiff or JPEG with the Olympus Viewer, I have the option to work on it (change contrast, color balance, etc.) before the translation to tiff or JPEG is complete.

Here's my question: Am I losing raw data (information) if I make no changes during translation; will there be less flexibility once the file comes out of Olympus Viewer as a tiff or JPEG? To work on a tiff or JPEG, I currently use Elements 6.

Yes. A TIF or JPEG contains less data than a RAW. For this reason, it's best to do your major adjustments (highlight & shadow recovery, exposure, white balance) to a RAW file before exporting the adjusted image as a TIF or JPEG copy. That said, a 16-bit TIF retains much more data than an 8-bit TIFF or JPEG (which is always 8-bit) and may preserve enough headroom for you to make significant adjustments without impacting final image quality. With a JPEG, once highlights or shadows have clipped, there's no way to recover that detail.

I also know that JPEG changes do entail loss of raw information each time the file is saved; is there any of this in tiff?

TIFs can be saved in a lossless format that will suffer no degradation with repeated editing and saving.

Is DNG superior to tiff for keeping possibilities for development?

DNG is a RAW format, just like CR2 or NEF. The idea of a universal RAW format is appealing, and I considered archiving my images as DNG. However, some RAW converters have added new features that enable higher-quality conversions but require the original RAW. These RAW processing improvements are not available with a DNG file. So, I'm sticking with my cameras' original RAW formats.

-- hide signature --

'No matter where you go, there you are.'

 Jacques Cornell's gear list:Jacques Cornell's gear list
Canon EOS-1D Mark III Canon EOS-1Ds Mark III Panasonic Lumix DMC-G3 Panasonic Lumix DMC-GX1 Panasonic Lumix DMC-G6 +32 more
Reply   Reply with quote   Complain
just Tony
Regular MemberPosts: 498
Like?
PS Elements can be a loss mechanism all by itself
In reply to clear glass, Mar 28, 2013

clear glass wrote:

Here's my question: Am I losing raw data (information) if I make no changes during translation; will there be less flexibility once the file comes out of Olympus Viewer as a tiff or JPEG? To work on a tiff or JPEG, I currently use Elements 6.

One reason I graduated from Elements 7 to the full version of Photoshop is that some of the editing tools are not provided in 16-bit mode. TIFF won't help you as much as you would hope if you apply 8-bit edits to the images.

Reply   Reply with quote   Complain
Bruce Oudekerk
Senior MemberPosts: 2,594
Like?
Most like to keep the RAW images...
In reply to Tom Axford, Mar 28, 2013

Tom Axford wrote:

...But most photographers who shoot in RAW like to keep the RAW images as well in case they want to go back and reprocess them as that may give slightly better quality than processing a saved TIFF or JPEG..

I feel compelled to reinforce this statement as its too easy to pass over it, ignore it or dismiss it outright as not being important.  However it is the best advice anyone on these forums will receive this week.

The process of demosaicing a RAW image into a raster/bitmap is elusive at best.  Photography is about making esthetic decisions as much as it is about making technical decisions.  In both ways, this RAW conversion can, and almost invariably will, change over time.  There have been huge improvements made by Adobe in ACR since I got my Sony a850 just a few years ago and I have been forced to redo the conversion of some of my original shots, especially those taken above ISO 800 or so.  While I might be the exception, I am constantly rethinking how I want to present an image.  Admittedly much of this re-evaluation and re-editing can be done from a non-lossy 16 bit TIFF or PSD  (and not the RAW) but even then there is a fairly stiff learning curve just to get the RAW conversion done properly… to the point where the virgin image can be saved and then edited without re-conversion.

For these reasons, I would suggest NEVER getting rid of your RAW images. I don’t even get rid of the junk.  (OK, I’m a packrat and you need to really assess your own needs:)   As one’s skills improve its possible to salvage a previously unusable image using new learned tricks.  Examples are endless.  An image that is too noisy might now be recoverable in new found processing software.  Or an image that was too soft or even one that is blurred do to movement can be salvaged.  Or the lousy photo of the kids might have one head that is ideal and can be composited onto another version.  Or an under or over exposed bracket might be usable to increase pseudo-dynamic range and prevent blown out highlights or increase shadow detail.  These are just a few of the things that I have done as my leaning curve broadens and my arsenal of tools increases. And all of this presupposes one has the original RAW to process.

Bruce

Reply   Reply with quote   Complain
Bruce Oudekerk
Senior MemberPosts: 2,594
Like?
Re: Question re. your comment on tiff.
In reply to Hugowolf, Mar 28, 2013

Hugowolf wrote:

TIFF isn’t really a file format, it is a wrapper class that allows for embedding images in several formats, in a somewhat similar fashion to PDF. So, from Photoshop, for example, you can save an image in TIFF using no compression, LZW (Lempel–Ziv–Welch, which is lossless), ZIP (which is lossless) or JPEG (which is lossy).

Very true.  However evey program i have ever used, defaults to saving a TIFF using no compression, which is lossless.  But like most things in life, not knowing what to ask gets us in big trouble... so everyone should always check.

Bruce

Reply   Reply with quote   Complain
Keyboard shortcuts:
FForum MMy threads