Sunday, May 23, 2010

Ask Tim Grey - 5/14/10 - Repeated JPEG Saves

Ask Tim GreyeNewsletter
May 14, 2010
Learn more at www.timgrey.com

Today's Question:
My understanding is that if you have a JPEG open in Photoshop, continuously make image changes, and repeatedly save (Command-S) it while it still is open, that no JPEG saving degradation happens until you leave Photoshop. In other words, there are no multiple saves, and therefore image degradation from changes, while you are still in Photoshop. Is this true?

Tim's Answer:
Nope, sorry, it isn't true.
My guess is that your information is based on a slight misunderstanding. If you repeatedly re-save a JPEG image (in other words, press Ctrl+S or Command+S repeatedly without applying any changes to the image), the file won't actually be saved repeatedly. In fact, the Save option on the File menu in Photoshop is disabled (dimmed) if the image hasn't been changed since the last time it was saved. That also means the keyboard shortcut (Ctrl+S or Command+S) doesn't actually do anything if there haven't been changes to the JPEG image. You'll note, for example, that no matter how many times you try to re-save the JPEG file without making any changes to the image, the timestamp for the file remains unchanged.
Any time a JPEG file is written, the information is re-encoded, which means compression is applied and some loss of quality occurs. While at a high Quality setting (in the JPEG Options dialog) the loss is minimal, and really not obvious to the unaided eye, there is still a change to the image data. This is naturally difficult to demonstrate when the actual pixel values have changed, since you can't compare the "before" and "after" from the perspective of the effects of JPEG compression. But the re-encoding of the data is always lossy with JPEG images.
In short, if a JPEG file is actually written, then JPEG compression was applied and some loss of image data occured. About the only "exception" to this, which is sort of an issue of semantics in any event, is lossless JPEG compression. But in that case, what's actually happening is that the small indicator (think of this as a metadata value) that indicates the rotation of the image (in 90-degree increments only) is being updated without actually re-writing the image information within the file. Other than a case like that, where again the actual image data isn't being changed, there's no way to save a JPEG image that has been modified without causing a loss of information due to JPEG compression.

Become a Member
The Ask Tim Grey eNewsletter is free to receive, but paid Ask Tim Grey Members receive special benefits, including:
Discounts on all purchases made through the Tim Grey online store
Opportunity to submit questions to be considered for inclusion in the Ask Tim Grey eNewsletter.
Discounts and special offers available only to Members.
Access to the full archive of previous emails (going back over eight years) with search capability.
The knowledge you are supporting this valuable service.
Much more!
Details on becoming a member can be found here:www.timgrey.com/asktimgrey/

No comments: