Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rawdawg

macrumors 6502a
Original poster
Jan 7, 2009
550
111
Brooklyn
A simple question but I believe I've been wrong all these years.

I assumed jpegs degradation occurs when you open a jpg, make a change, and then resave it. Then if you were to open it again, make a change, it would further degrade in quality.

After reading something today it made it seem as if during ever step or adjustment in photoshop a jpg degrades a little, so that if you make 10 adjustments it's equivalent to 10 save/ reopens.

Now let's see how many people write back "you should shoot RAW" or something else obvious and unhelpful that's not related to my question
 

motulist

macrumors 601
Dec 2, 2003
4,235
611
jpg only degrades when you save. Whatever you do between each save does nothing extra to reduce quality.
 

rawdawg

macrumors 6502a
Original poster
Jan 7, 2009
550
111
Brooklyn
jpg only degrades when you save. Whatever you do between each save does nothing extra to reduce quality.

that's what I always thought..

I'm reading up on some photoshop workflow stuff and the following made me wonder if in fact it degraded after every adjustment: It's also worth mentioning that selecting any of these basic adjustment tools via the "Image > Adjustments" menu can have its own set of problems. An unpleasant fact of life when processing digital images is the degradation that occurs every time we make even the most minor of adjustments. If your images are anything thing like mine you will need to make a number of adjustments to tone, colour, saturation, etc. before reaching the desired result. The combined effect of all these adjustments will be a "Histogram" that looks like a badly maintained picket fence. The more gaps in the Histogram the more missing information the more banding/posterisation...

This explanation was followed by a picture of a histogram that looked very choppy..halfway down the page here

I was just checking
 

Flash SWT

macrumors 6502
Mar 14, 2009
459
23
Houston, TX
Well no, that is accurate. Every time you make an adjustment it changes the pixels so you are moving further and further away from the original with each change. In a sense you are degrading the image away from the original. (However since some of the adjustments may improve the image visually I can see where calling it a degradation may seem confusing.)

When you save the image as a JPEG you are in essence "locking in" all the changes so you are permanently stuck with them if you save over the original. This is why I always save my original JPEGS untouched and any edits are saved out using the Save As command creating a second file. However remember this second file is "locked in" as well so if you were to re-edit it you have to throw away more data with additional edits.

One way to avoid this is to use Adjustment Layers in the layers window of Photoshop and save as a PSD file. This allows you to easily erase the adjustment layers and step back to the original file with no loss of quality.

.
 

Doylem

macrumors 68040
Dec 30, 2006
3,858
3,642
Wherever I hang my hat...
jpg only degrades when you save.

This is what I've always understood. So I shoot RAW, convert to Tiff for adjustments in Aperture and PS, and the last step is to save as a jpeg. These compressed files are what I use for publication and picture libraries. If I want to make other adjustments, or a different crop, etc, I go back to the saved Tiff rather than work on a jpeg.
 

ukuleleman

macrumors member
Jul 19, 2009
91
2
JPegs = lossy files

jpg only degrades when you save. Whatever you do between each save does nothing extra to reduce quality.

This is not true according to Bryan Peterson the author of both 'Understanding Exposure' and 'Understanding Digital Photography'.

Here is a quote from 'Understanding Digital Photography', it is taken from a passage in which he refers to the jpeg as a 'lossy, or lousy file,

Quote ('The scientific word 'Lossy' is derived from the word 'loss', as in 'to lose'
and it refers to a JPEG file's inability to hold and maintain the original data (the actual image) over time.

Every time you open and close a JPEG file on your computer the file degrades due to data being lost'.) End quote.

I often wondered why my older Jpeg pictures were beginning to look tatty and this absolutely explains it, repeated opening and closing of JPEG files will eventually render them useless, that's why I put my keepers onto CD, that way I get back to almost the original state of the picture every time I copy the CD.
 

motulist

macrumors 601
Dec 2, 2003
4,235
611
This is not true according to Bryan Peterson the author of both 'Understanding Exposure' and 'Understanding Digital Photography'.

Here is a quote from 'Understanding Digital Photography', it is taken from a passage in which he refers to the jpeg as a 'lossy, or lousy file,

Quote ('The scientific word 'Lossy' is derived from the word 'loss', as in 'to lose'
and it refers to a JPEG file's inability to hold and maintain the original data (the actual image) over time.

Every time you open and close a JPEG file on your computer the file degrades due to data being lost'.) End quote.

I often wondered why my older Jpeg pictures were beginning to look tatty and this absolutely explains it, repeated opening and closing of JPEG files will eventually render them useless, that's why I put my keepers onto CD, that way I get back to almost the original state of the picture every time I copy the CD.

Sorry, but I think you've completely misunderstood his quote. Digital is digital. Simply opening a jpeg and then closing it again without saving does absolutely not in any way, shape or form, degrade the quality of the image file stored on your disk. You can open and close (without saving) a jpeg file literally an infinite amount of times, and it will not change the way your jpeg looks by even a single bit. Digital is not analog, you don't wear out the file by playing it over and over again. That's simply not the way it works. I guarantee you what he meant by that quote was that

"Every time you open and then SAVE a JPEG file on your computer the file degrades due to data being lost."

I promise you, with 100% certainty, simply opening a jpeg image and then closing the image window without saving it to the file literally doesn't change your saved image at all.

p.s. you've got to tell me that you believe me. This is an absolutely fundamental principle that is at the very bedrock of how computers work. I wouldn't be happy if I thought there were such a poorly informed Mac user out there making us all look bad.
 

ukuleleman

macrumors member
Jul 19, 2009
91
2
I wouldn't be happy if I thought there were such a poorly informed Mac user out there making us all look bad.

Sorry if you think I make you look bad, I learn by reading and it has stood me in good stead for more years than I care to remember, I have experienced this degradation of JPEG pictures and I assure you that it happens, what am I going to do, believe an internationally respected author, or some guy who thinks more about me making him look bad?

Thousands of copies of this book have been sold and, to my knowledge, nobody has challenged Peterson on the content.

How is it possible to misinterpret:-

'Every time you open and close a JPEG file on your computer the file degrades due to data being lost'.

It's no skin off my nose if you choose not to believe it,

By the way, the earth isn't flat!
 

Doylem

macrumors 68040
Dec 30, 2006
3,858
3,642
Wherever I hang my hat...
Well, guys, it sounds like a theory that can be tested. Get a jpeg file and leave it sitting on the desktop. Duplicate it and open and close the duplicate as many times as you can before you get bored... and then compare both files in PS blown up to 100%. Wouldn't that be reasonably scientific??
 

jampat

macrumors 6502a
Mar 17, 2008
682
0
Well, guys, it sounds like a theory that can be tested. Get a jpeg file and leave it sitting on the desktop. Duplicate it and open and close the duplicate as many times as you can before you get bored... and then compare both files in PS blown up to 100%. Wouldn't that be reasonably scientific??

When you get done doing whatever opening/closing you want, drop the new file into the old file as a new layer, set the blending mode to difference. All black = exactly the same file.
 

KeithPratt

macrumors 6502a
Mar 6, 2007
804
3
Thousands of copies of this book have been sold and, to my knowledge, nobody has challenged Peterson on the content.

Well let me be the first. It's thoroughly incorrect. Simply opening and closing a document will not cause degradation. If you open and close a .doc file several times do find more and more words missing each time? Digital files do not degrade — that's the point of digital. What will degrade is the physical media it's on, which is susceptible like any other physical item.

The degradation people talk about in reference to JPEG is compression. Every time you save it you are compressing it anew. Whether the image "degrades" with this action is really your call. To a computer it will always be just a bunch of pixels.

If you alter the image in Photoshop it's done at massively high quality, so there won't be any real-world degradation. You may however begin to notice the limits of the original JPEG when you try to push it too far.
 

motulist

macrumors 601
Dec 2, 2003
4,235
611
Well, guys, it sounds like a theory that can be tested. Get a jpeg file and leave it sitting on the desktop. Duplicate it and open and close the duplicate as many times as you can before you get bored... and then compare both files in PS blown up to 100%. Wouldn't that be reasonably scientific??

I hear ya, and I encourage the OP to do this if he needs concrete proof, but the only thing you need to know to be certain is a basic understanding of how computers work.

A file is stored on disk. All files are composed of a series of ones and zeros written on the disk.

When a file is opened, this series of ones and zeros are copied into the computer's RAM. While the copy of the file's data is in RAM, the program can do anything to this second copy of the file data. For instance if this is an image file, then the computer can ONLY do a brightness manipulation on the copy of the image file's data that was copied into RAM. The original data file is still sitting on the hard drive UNCHANGED. Only when you SAVE the file again is there a permanent change to the file that is stored on disk. In fact, that's why the command is *called* save!

To test this, all you need to do is look at a file's "date modified" time, then open the image file, do some alterations to it, then close the window and when prompted click "don't save". Now look at the date modified on the file, and you'll see that it says the same time as it was at the moment when you opened the file. That means the file has NOT been modified in any way!

And if you're under the impression that merely reading a saved file can degrade it, then think about what you're saying! Basically your entire computer is running on code that's stored in data files on your disk. For your computer to function at all, it REQUIRES that these huge amount of program code files are *always* EXACTLY the same at all times, forever. In fact, when something bad does happen to your disk which alters the saved files in an unexpected way, that's called disk corruption, and it causes your entire computer to become fubar in a very short period of time.

This is very basic computer knowledge. A storage drive keeps your files exactly as they are, and they do not changed at all with repeated openings and save-less closings of the file. The only way the file can be changed when it has not been resaved is if your physical disk is actually becoming physically, mechanically damaged. And of course, that happens very rarely and has absolutely nothing to do with what format a file is saved in.
 

motulist

macrumors 601
Dec 2, 2003
4,235
611
Sorry if you think I make you look bad, I learn by reading and it has stood me in good stead for more years than I care to remember, I have experienced this degradation of JPEG pictures and I assure you that it happens, what am I going to do, believe an internationally respected author, or some guy who thinks more about me making him look bad?

Thousands of copies of this book have been sold and, to my knowledge, nobody has challenged Peterson on the content.

How is it possible to misinterpret:-

'Every time you open and close a JPEG file on your computer the file degrades due to data being lost'.

It's no skin off my nose if you choose not to believe it,

By the way, the earth isn't flat!


Then you're being foolish, because you're depending on YOUR interpretation of his words based on YOUR very limited knowledge of the subject. When he said "close" you're interpreting that to mean "close in any fashion", when it's clear to anyone who knows anything about computers that he was trying to convey the meaning of when you "close and save". And guess what, even the most respected authors in the most respected publications make occasional very minor wording inaccuracies when explaining very technical matters. You're being silly if you're under the impression that everything you read in a book is 100% true and completely free of any misleadingly worded phrases, especially when you're getting a very clear and detailed explanation of the matter from many people in a technical forum dedicated specifically to this topic, on a subject that is extremely basic to anyone that knows anything at all about this stuff.
 

Baja2k

macrumors member
Jun 18, 2003
79
0
Texas
This is not true according to Bryan Peterson the author of both 'Understanding Exposure' and 'Understanding Digital Photography'.

Here is a quote from 'Understanding Digital Photography', it is taken from a passage in which he refers to the jpeg as a 'lossy, or lousy file,

Quote ('The scientific word 'Lossy' is derived from the word 'loss', as in 'to lose'
and it refers to a JPEG file's inability to hold and maintain the original data (the actual image) over time.

Every time you open and close a JPEG file on your computer the file degrades due to data being lost'.) End quote.

I often wondered why my older Jpeg pictures were beginning to look tatty and this absolutely explains it, repeated opening and closing of JPEG files will eventually render them useless, that's why I put my keepers onto CD, that way I get back to almost the original state of the picture every time I copy the CD.


I've got to agree with motulist on this one, with the slight exception that I don't think your beliefs make me or anyone else look bad. If fact, I don't think they make you look bad either but enough about that.

The fact is that the save operation actually re-compresses a file that has already been compressed. The first time a jpeg is created, whether in the camera or on a computer it is created with the data (1's and 0's) being run through a compression algorithm. It is this process and only this process that tosses out data. This is the Data the algorithm "decides" the image can be seen fairly accurately without.

Now each time you SAVE a jpeg you run it through this exact same process and each time it can throw out some of the data, which over time, will lead to an image that is significantly degraded compared to the original. Changing the 1's and 0's is the only way.

You can open/close files an infinite number of times without changing the 1's and 0's because the open and close does not run the file through the compression algorithm.

If you read anything differently in a photography book it is either wrong, a typo, or just mis-understood. We tend to believe things we read in what appears to be an authoritative source. And no this forum doesn't qualify. It is my belief that maybe your older pictures don't appear as nice as newer pictures due to several factors.... none of which have anything to do with the pictures actually losing data.

1. new technology my old pictures still look great given the camera that was used. But they just don't compare to my new camera.
2. compression algorithms can change as well (So if the old photo's were created with and older firmware or older version of editing software the algorithm could make it look slightly different compared to images off the same camera with newer software/firmware.
 

ukuleleman

macrumors member
Jul 19, 2009
91
2
I'm convinced

OK guys, I'm convinced, lots of good sense talked here and (I went back to the books!) confirmed by Andy Rouse.

I am long enough in the tooth to hold my hands up, thanks for your patience, we live and learn.
 

motulist

macrumors 601
Dec 2, 2003
4,235
611
OK guys, I'm convinced, lots of good sense talked here and (I went back to the books!) confirmed by Andy Rouse.

I am long enough in the tooth to hold my hands up, thanks for your patience, we live and learn.

:) FYI, no offense was ever intended. My vigor was due to a strong desire to pass on an important piece of information about how to get the most out of your photography, for you personally and for anyone else who might have been reading this thread.
 

TJRiver

macrumors 6502
Jan 14, 2009
269
0
Sorry if you think I make you look bad, I learn by reading and it has stood me in good stead for more years than I care to remember, I have experienced this degradation of JPEG pictures and I assure you that it happens, what am I going to do, believe an internationally respected author, or some guy who thinks more about me making him look bad?

Thousands of copies of this book have been sold and, to my knowledge, nobody has challenged Peterson on the content.

How is it possible to misinterpret:-

'Every time you open and close a JPEG file on your computer the file degrades due to data being lost'.

It's no skin off my nose if you choose not to believe it,

By the way, the earth isn't flat!

Sooooooo, this means that every time I open and close a mp3 or ACC file (both "lossy" format digital files) I lose quality? I have music files that my kids play hundreds of times and to my (tin) ear, there has been no degradation of sound quality whatsoever. Certainly, these lossy audio files get opened and closed MANY more times than most jpg files. Following your logic, these files should be unlistenable, or have degraded to the point where they no longer can even be heard,

My understanding of a lossy file format is specifically one that does not completely capture the original source, be it audio or a photograph. The file format uses formulas to determine what portions of the source information that can be deleted from the file and still allow the sound or picture file to be acceptable. This accounts for the huge file size differential between lossy and non-lossy file formats. Because the file is not an accurate snapshot of the picture/audio, every time you copy it, you lose more information vs the original source, thus you get degradation.

Of course, I could be wrong...............
 

OatmealRocks

macrumors 6502a
Jul 30, 2009
626
3
Sorry if you think I make you look bad, I learn by reading and it has stood me in good stead for more years than I care to remember, I have experienced this degradation of JPEG pictures and I assure you that it happens, what am I going to do, believe an internationally respected author, or some guy who thinks more about me making him look bad?

Thousands of copies of this book have been sold and, to my knowledge, nobody has challenged Peterson on the content.

How is it possible to misinterpret:-

'Every time you open and close a JPEG file on your computer the file degrades due to data being lost'.

It's no skin off my nose if you choose not to believe it,

By the way, the earth isn't flat!

HAHAA This has to be a joke right? You can actually see the difference? This reminds me of a bunch of "Audiophiles" who were asked if they could hear the difference from bunch of $1000/ft audio cables and the kicker a coat hanger as well which was thrown in. Basically in the end the test results from the "Audiophiles" were inconsistent and $1000+/ft cables had great marketing.

Just want to reconfirm what was said. If you open a jpeg and close (without changes) it will not degrade the quality. It is the whole principal of digital.
 

dmmcintyre3

macrumors 68020
Mar 4, 2007
2,131
3
How many times would a jpg on a website with Millions of pageviews a day not degrade if it was true? Makes no sense then.
 

motulist

macrumors 601
Dec 2, 2003
4,235
611
Okay guys, that's more than enough. He's already given a mea culpa, let's not be ******s.
 

Ruahrc

macrumors 65816
Jun 9, 2009
1,345
0
Going back to the OP, I would say that it depends on what you're doing, what program you're doing it in, and how you're doing it.

Examples:

If you make judicious use of adjustment layers or layers in general then you can "non-destructively" edit the jpeg and only suffer loss in quality when you (re)save.

If you undo "wrong" edits by using undo, photoshop probably is using a history state and is restoring the original data. So if you bump up those levels and then find it is too much and hit "undo" then you will not have degraded the image.

Say you edit the levels on an image. You like it and press OK, accepting the changes. Now you clone out some dust or power lines and then decide you want to adjust the levels again because you wanted more contrast. If you go back to the levels adjustment the changes from the previous levels adjustment are permanent and the second levels adjustment will be using the altered data from the first adjustment. To "do it properly" you'd have to undo your changes back through the first levels adjustment and then re-do the levels adjustmtent with new settings more to your liking. Note that this applies to RAW/TIFF too- and is the reason why using adjustment levels is recommended.

Another area where this comes in to play a lot is rotation. Say you rotate an image 3 degrees to the left. But then you find that it is too much, so you rotate 1 degree back to the right (for a total of 2 degrees left from the original). Since you're re-rotating the already rotated image there will be quality loss. The best way to do it would be to undo the rotation then rotate 2 degrees to the left from the original image.

Note that non-destructive editing progams like Aperture or Lightroom do not have these issues. You can re-rotate or tweak the sliders with no penalty because the program does not actually apply the adjustments until export, whereas programs like photoshop will apply them once you hit "OK".

Ruahrc
 

Designer Dale

macrumors 68040
Mar 25, 2009
3,950
101
Folding space
OK.

I subscribe to the "Let's not find out on something important" line of thinking. I do as Doylem does and keep everything as a TIF and save as a JPG as the last step. Theory is JPG files loose pixels when compressed (saved), why question it or submit it to testing? Anything with PhotoShop alters an image, no question. Keep post processing to a minimum on photos for reproduction.

Dale
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.