PDA

View Full Version : tiff or jpg?


Ali_baba
05-02-2005, 04:23 AM
which one is the best in quality aspect?

I know that tiff takes more space than jpg and also camera takes more time to write tiff format in card. But I would like to know the difference in quality sense.

Anybody with experience in this area?

Thanks in advance

Thalas'shaya
05-02-2005, 08:20 AM
jpg compression causes data loss. the more you compress a jpeg file, the more data is lost. tiff is supposed to be "loss-less", but my understanding is that (at least for large enough pixel counts) you don't notice a quality difference between a high-quality jpeg and tiff, and the jpeg takes up less memory.

nate
05-02-2005, 12:24 PM
My understanding is this: if you are maniuplating a jpg file, it will be compressed further every time you save it. The solution is to work with the tiff file, and then finally convert it to jpg at the end (if file size is your concern).

eastcoastjoe
05-03-2005, 03:56 PM
I only work on tiff copies of the origianl jpegs. The first jpeging, when the camera makes the file after the image has been captured, is hardly noticable if at all. Subsequent jpeg compressions will likely be visible. Photoshop's native format, .psd, works as well but is not as portable. Almost any good printshop can print a tiff and it can be used in layout programs. In design work, I always use tiff files in layouts for printed output.

In the olden days many people worked in .psd and converted to tiff only for final printing, as tiffs could not be saved with layers. Now that layered tiffs are available, there's not much of a reason to use .psd and then convert. Also, LZW compression on tiffs is not lossy, so feel free to use it every time.

One way or another though the important thing is to use a lossless file format and to that end, tiff is great. Big, but great.

John_Reed
05-04-2005, 07:55 AM
which one is the best in quality aspect?

I know that tiff takes more space than jpg and also camera takes more time to write tiff format in card. But I would like to know the difference in quality sense.

Anybody with experience in this area?

Thanks in advanceI've strained my eyes for years trying to see the "loss" in image files because of "fine" JPEG compression. In fact, a couple of years ago someone ran a pixel for pixel test, and found that the TIFF file and the corresponding JPEG file were virtually identical. If you download the JPEG file to your computer, and always do your edits or crops on copies of the original, you'll never go wrong.

eastcoastjoe
05-04-2005, 08:42 AM
John,

I respectfully disagree with you. While you're correct that compression may not be noticable, each save in jpeg mode adds compression and the cumulative effect is almost always noticable.

I would recomend taking a look at page 204 of "Real World Digital Photography" by Katrin Eismann. There she has a demonstration using the same picture, each with an increaqsing level of compression to show how the jpeg compression averages the colors of the pixels. The results are pretty clear and quite noticable.

For many years in the design business jpegs were only used as previews as many wanted no part of compression for final output. Today's jpegs are much better at printing than in the past and as we know from contemporary digital cameras, they can produce stunning output. But adding additional compression doesn't really serve anyone; hard drive space and offline storage (CDs DVDs) is relatively cheap so why not have the best image possible?

Hey, I wish my Frank (FZ20) had a super fine mode for shooting. I would gladly devote an extra megabyte per file to have even a little less compression than the fine mode that's available now. Not that I have any problems with what I am shooting but overall, the less processing the better. Jpeging is, by nature, a destructive process; and there is no way to retrieve that data, short of going back to the (an) original, after the compression has been added.

And by the way, I hate the thought that I am disagreeing with you as I have seen your work and it is quite good. Your many posts are right on target and have been very helpful; I have just been taught to use jpeg compression sparingly and feel that's the best information to pass on.

Rhys
05-04-2005, 09:25 AM
when an image is saved as a compressed jpeg image then resaved, the following happens:

1. The image is compressed and saved.
2. The image is uncompressed and displayed.
3. The image is re-compressed and saved.

If the compression algorithm is the same then there's no reason why there should be any noticable difference, assuming the image is saved as 100% rather than as 75% etc.

Re-saving jpegs can cause loss of quality but not always.

emalvick
05-04-2005, 09:41 AM
when an image is saved as a compressed jpeg image then resaved, the following happens:

1. The image is compressed and saved.
2. The image is uncompressed and displayed.
3. The image is re-compressed and saved.

If the compression algorithm is the same then there's no reason why there should be any noticable difference, assuming the image is saved as 100% rather than as 75% etc.

Re-saving jpegs can cause loss of quality but not always.

The problem with the algorithms is that each resave (recompression) actually compresses a bit more....

Say you start with a Tiff and do step 1. You compressed the file losing some data. Doing step 2 uncompresses the file, but it is not the same Tiff you start with... I think we are all in agreement there.

Now when you take the new uncompressed image and recompress it, you actually end up with a file that is further compressed. The jpg algorithm things you have a new tiff and is trying to compress it further. Each time you try to save a jpg it tries to compress it further. If it compressed to exactly the same jpg as before, then a jpg should never lose data, and the jpg should never be different than the tiff in the first place. Unfortunately, that is not the case.

However, I don't doubt that today's jpg algorithms are much better than those of the past. I actually take my photos as jpgs because at least at that initial save there is very little difference from a tiff. At least it isn't enough to bother me. If I use photoshop to work on the file, I will always save the photoshop file as my base point, so any further saving to jpg will in effect be only the 2nd compression. I'm not a professional photographer, so that is fine with me. If I'm going to make a print, I go from the photoshop file to the printer, which means I've only had one compression run. Again that is to my satisfaction.

Perhaps when I have the money I will think differently, but the idea of camera memory being cheap is relative to what one consider's cheap. I like being able to fit 600 photos on a SD card instead of 100 or less as happens when I go from jpg to tiff. I take too many photos to afford the SD cards I would need. However, I don't mind storing the uncompressed files on a CD that only costs 10 cents later.

That's what works for me.

What's important: just understand what is happening when you use jpgs and how important those effects are to you.

-Erik

John_Reed
05-04-2005, 10:17 AM
John,

I respectfully disagree with you. While you're correct that compression may not be noticable, each save in jpeg mode adds compression and the cumulative effect is almost always noticable.

I would recomend taking a look at page 204 of "Real World Digital Photography" by Katrin Eismann. There she has a demonstration using the same picture, each with an increaqsing level of compression to show how the jpeg compression averages the colors of the pixels. The results are pretty clear and quite noticable.

For many years in the design business jpegs were only used as previews as many wanted no part of compression for final output. Today's jpegs are much better at printing than in the past and as we know from contemporary digital cameras, they can produce stunning output. But adding additional compression doesn't really serve anyone; hard drive space and offline storage (CDs DVDs) is relatively cheap so why not have the best image possible?

Hey, I wish my Frank (FZ20) had a super fine mode for shooting. I would gladly devote an extra megabyte per file to have even a little less compression than the fine mode that's available now. Not that I have any problems with what I am shooting but overall, the less processing the better. Jpeging is, by nature, a destructive process; and there is no way to retrieve that data, short of going back to the (an) original, after the compression has been added.

And by the way, I hate the thought that I am disagreeing with you as I have seen your work and it is quite good. Your many posts are right on target and have been very helpful; I have just been taught to use jpeg compression sparingly and feel that's the best information to pass on."If you download the JPEG file to your computer, and always do your edits or crops on copies of the original, you'll never go wrong."

Was there some part of that quote you misunderstood to mean that I was advocating re-saving and re-compressing JPEG files?

Rhys
05-04-2005, 10:41 AM
The problem with the algorithms is that each resave (recompression) actually compresses a bit more....-Erik

I don't think that's quite right.

Try these for more information:
http://dynamo.ecn.purdue.edu/~ace/jpeg-tut/jpegtut1.html
http://www.w3.org/Graphics/JPEG/

eastcoastjoe
05-04-2005, 12:46 PM
John,

Sorry if I miss understood. It's the subsequent jpegging that starts to degrade the file; that's really what I wished to emphasize. At what point that becomes noticable is obviously a matter of debate.

Hey I shoot in jpeg and don't shoot in tiff; jpegs are a miracle of modern computing and allow us to have consumer oriented digital cameras. I don't have the room on my SD cards for tiffs; but when it comes to working on an image, .psd and tiff are preferable for a variety of reasons. I also convert my files from sRGB to the wider gamut Adobe RGB. This may not be what everyone wants but like the compression issue, I feel it's important to put the info out there for each reader to decide on his or her own.

Again, sorry for the misundertanding and once more I would like to thank you for the many informative, and routinely dead on, posts.

emalvick
05-04-2005, 02:00 PM
I don't think that's quite right.

Try these for more information:
http://dynamo.ecn.purdue.edu/~ace/jpeg-tut/jpegtut1.html
http://www.w3.org/Graphics/JPEG/

Those sites don't say much of what happens when the jpg algorithm is repeatedly run. I won't say that one way or the other is right or wrong, but my old roommate was a graphical computer science student and actually did studies using the 100% quality option. He wrote a program that would repeadly compress and uncompress jpgs in the manner that has been discussed in this thread.

While the results varied by resolution, color depth, content, etc, they always showed a continued degradation for some period of time that led to a file that was up to 25% different from the original photo. Perhaps there are slight differences in jpg algorithms, but that rounding process that produces the "lossy" aspect of jpg gets repeated each time the file is recompressed. In a sense you will be rounding the rounded numbers. There is a point where that loss will stop, but in the study my roommate did (and I'm sorry it was an undergrad class project so I don't have the exact info) the loss did continue through multiple recompression. The worst case I saw showed the ultimate file have 25% of the pixels different from the original tiff. The best case I saw was 5%. On the average, the repeated compression ledt to about 10% difference.

The great thing about the study was that he was recompressing these files millions of times (5 mil if I remember right). The average person won't ever do that much editing. The bad news is that a large portion of the losses will happen early in the repeating process.

Never-the-less as far as compression algorithms go, jpg is one of the best. My roommate did a test on mp3 files (mpg) and repeated compression. Let's just say that in no time, you end up with no sound at all. I know very little of the compression algorithm used, but it runs off of filters that ultimately degrade the sound to nothing.

Erik

John_Reed
05-04-2005, 02:05 PM
John,

Sorry if I miss understood. It's the subsequent jpegging that starts to degrade the file; that's really what I wished to emphasize. At what point that becomes noticable is obviously a matter of debate.

Hey I shoot in jpeg and don't shoot in tiff; jpegs are a miracle of modern computing and allow us to have consumer oriented digital cameras. I don't have the room on my SD cards for tiffs; but when it comes to working on an image, .psd and tiff are preferable for a variety of reasons. I also convert my files from sRGB to the wider gamut Adobe RGB. This may not be what everyone wants but like the compression issue, I feel it's important to put the info out there for each reader to decide on his or her own.

Again, sorry for the misundertanding and once more I would like to thank you for the many informative, and routinely dead on, posts.Don't worry about offending me. I always like a healthy discussion. Actually, my practice is not to work on a copy of the JPEG file, but rather to always "Save As" the file, so that the edited version becomes a new file name. My Apple iPhoto program takes care of the problem by always saving the original image in an "originals" folder, letting the user whale away on the copy. So I misrepresented my own practice, and you were correct to object.

Frankly, though, in my opinion, for most people the editing process would never go deep enough that noticeable JPEG artifacts would arise; for me, one or two levels of editing is about it in 95% of the photos I've fooled around with.

Another thing: Maybe it's my own lack of fussiness, but I've shot thousands of photos at the JPEG "standard" level of compression, not "fine," and to me, they have looked very good. In fact, I have a 13X19 framed print hanging in my office that I made from a 2MP Panasonic FZ1 image (bicubically interpolated with Photoshop) from the San Blas Archipelago (off Panama). The original image file size is 317K bytes! I still use the fine compression as long as I have plenty of memory space, but reserve the right to use standard compression, and I don't really think I'll suffer much as a result.

erichlund
05-05-2005, 10:29 AM
when an image is saved as a compressed jpeg image then resaved, the following happens:

1. The image is compressed and saved.
2. The image is uncompressed and displayed.
3. The image is re-compressed and saved.

If the compression algorithm is the same then there's no reason why there should be any noticable difference, assuming the image is saved as 100% rather than as 75% etc.

Re-saving jpegs can cause loss of quality but not always.

There are different types of compression. There is lossless compression, such as you get when you compress a computer program or data. There can be no loss, so the algorithm must be able to reconstruct an exact copy. JPG is not lossless. It can also be tuned to the amount of compression you wish to use. We typically use the fine JPG because it gives the best quality. That's because it is using the least compression. The "large", as in "fine, large JPG" refers to resolution and has nothing to do with the amount of compression. Fine uses little compression, Normal uses more and Basic uses a lot. The problem is that once the image is compressed and saved, decompressing to display returns the image with lost, averaged pixel information intact. If an area was averaged, you get back the average. Each time the algorithm is run to save the image, it averages based on the new input, not the original, so the effect is cumulative. If you want to see jpg compression rear its ugly head, print and save a basic jpg about 10 times. A basic will degrade much faster than a fine jpg.

With some programs, you can alter the amount of compression the program uses on future saves. So even if you took a Normal jpg, you could then set the program to use its minimum compression for additional saves. I suspect both Photoshop and Paint Shop Pro have this feature, though, being a RAW shooter, I haven't checked recently. Also, I don't know if any of these programs can save jpg as truly 100%, or lossless.

Cheers,
Eric

Richard Lynch
05-06-2005, 10:52 AM
which one is the best in quality aspect?

If quality is the concern, there is no choice: TIF

JPEG compression will leave artifacts and is a lossy format. TIF is not lossy.

If you have a choice, you may want to shoot RAW, which will retain the capture information.

Richard Lynch
http://hiddenelements.com

Balrog
05-06-2005, 11:04 AM
imho, the quality difference between the highest quality JPEG and a TIFF isn't noticeable .. definitely not worth the massive slowdowns when using TIFF. Shoot fine JPEGs, if you need to edit then use an intermediate lossless format (.psd or .tiff or whatever) and then save the *final* image in JPEG again.