JPEG quality

NH
Posted By
Nicolas Hoch
Feb 12, 2005
Views
653
Replies
19
Status
Closed
Hi,

when saving a PSD to JPEG with e.g. 75%, opening the JPEG and save it again with 100%, which quality does it have? Still 75% or less? I think, in TIFF you can use either no compression, or lossless compression or lossy compression. How about JPEG?

I guess, choosing quality "12" in Photoshop (maximum) is equal to "100%" you can use in other editors. But 100% is still a little lossy, right?

Thanks,
Nico

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

2
2Shy
Feb 12, 2005
Whenever you resave a jpg as a jpg it will lose quality (even if you resave it at 100% quality). The quality loss might not be apparent immediately, but after many resizings it will be. If the original jpg didn’t turn out the way you want, it’s always best to open the original uncompressed (non-jpg) file and resave it as a jpg with different quality settings until you get the look and file size you want.
"Nicolas Brentz" wrote in message
Hi,

when saving a PSD to JPEG with e.g. 75%, opening the JPEG and save it again with 100%, which quality does it have? Still 75% or less? I think, in TIFF you can use either no compression, or lossless compression or lossy compression. How about JPEG?

I guess, choosing quality "12" in Photoshop (maximum) is equal to "100%" you can use in other editors. But 100% is still a little lossy, right?
Thanks,
Nico
D
Dave
Feb 12, 2005
On Sat, 12 Feb 2005 03:02:30 +0100, "Nicolas Brentz" wrote:

Hi,

when saving a PSD to JPEG with e.g. 75%, opening the JPEG and save it again with 100%, which quality does it have? Still 75% or less?

100% 0f the saved 75%, Nico.

I think, in TIFF you can use either no compression, or lossless compression or lossy compression. How about JPEG?

JPG is lossy

I guess, choosing quality "12" in Photoshop (maximum) is equal to "100%" you can use in other editors. But 100% is still a little lossy, right?

Quite right, thats why you should always save @ 100%

Dave
D
Dave
Feb 12, 2005
On Sat, 12 Feb 2005 07:21:10 +0200, Dave wrote:

On Sat, 12 Feb 2005 03:02:30 +0100, "Nicolas Brentz" wrote:

Hi,

when saving a PSD to JPEG with e.g. 75%, opening the JPEG and save it again with 100%, which quality does it have? Still 75% or less?

100% 0f the saved 75%, Nico.

or maybe 74.75%:-)

Dave
JR
John Rampling
Feb 12, 2005
I did a test to find out for myself:

Original .bmp image = 1256 kB
Save as .psd file (unedited) = 1261 kB
Save original as 100% JPEG= 631kB
Save as 25% JPEG= 68 kB
Open 25% jpeg and save as 100% = 262 kB*
Save original as 50% JPEG= 118 kB
Open 50% jpeg and save as 100% = 362 kB*
Save original as 75% JPEG= 209 kB
Open 75% jpeg and save as 100% = 391 kB*

*The file size in each case has increased, but the QUALITY has NOT increased. Once you have compressed the image you can not restore pixels.

I guess I could do the same test with TIFFs but the point is that once lost, lost forever. Always save the original uncompressed image if there is any chance that you will want to edit it one day.

John

"Nicolas Brentz" wrote in message
Hi,

when saving a PSD to JPEG with e.g. 75%, opening the JPEG and save it again with 100%, which quality does it have? Still 75% or less? I think, in TIFF you can use either no compression, or lossless compression or lossy compression. How about JPEG?

I guess, choosing quality "12" in Photoshop (maximum) is equal to "100%" you can use in other editors. But 100% is still a little lossy, right?
Thanks,
Nico
C
Clyde
Feb 12, 2005
John Rampling wrote:
I did a test to find out for myself:

Original .bmp image = 1256 kB
Save as .psd file (unedited) = 1261 kB
Save original as 100% JPEG= 631kB
Save as 25% JPEG= 68 kB
Open 25% jpeg and save as 100% = 262 kB*
Save original as 50% JPEG= 118 kB
Open 50% jpeg and save as 100% = 362 kB*
Save original as 75% JPEG= 209 kB
Open 75% jpeg and save as 100% = 391 kB*

*The file size in each case has increased, but the QUALITY has NOT increased. Once you have compressed the image you can not restore pixels.
I guess I could do the same test with TIFFs but the point is that once lost, lost forever. Always save the original uncompressed image if there is any chance that you will want to edit it one day.

John

"Nicolas Brentz" wrote in message

Hi,

when saving a PSD to JPEG with e.g. 75%, opening the JPEG and save it again with 100%, which quality does it have? Still 75% or less? I think, in TIFF you can use either no compression, or lossless compression or lossy compression. How about JPEG?

I guess, choosing quality "12" in Photoshop (maximum) is equal to "100%" you can use in other editors. But 100% is still a little lossy, right?
Thanks,
Nico

OTOH, I just ran a test…

PSD file – 31.1M
Saved for Web at 60 – 237.4K
Standard save to JPEG at quality 6 optimized – 155.6K

Saved for Web opened & saved the same with a new name – 237.4K Standard opened & saved the same way with a new name – 155.5K

It appears that if you don’t change anything, Photoshop doesn’t change anything. i.e. It doesn’t look like it’s recompressing.

How far does this go? I don’t know. If you change just some of the picture, does it only recompress the changed part? I opened that first "Saved for Web" and changed the white background/surround to blue and saved. That result was 258.6K. I’m not sure what that means.

Then again, I’m not sure I care. In every one of these pictures the main subject LOOKS exactly the same. I don’t worry about changes to pictures that I can’t see. If I can’t see it, it doesn’t matter.

Clyde
EG
Eric Gill
Feb 12, 2005
Clyde wrote in news:1oSdnVzFIYNAt5PfRVn-
:

It appears that if you don’t change anything, Photoshop doesn’t change anything. i.e. It doesn’t look like it’s recompressing.

Of course it is. When you open the file, it’s decompressed into pixels for you to work on. When you re-save it, it’s re-compressed.

If you haven’t made massive changes to the pic and use the same compression ratio, the file size is going to be very similar, and I don’t know why you would expect otherwise. The image degradation is cumulative; the compression is not.

How far does this go? I don’t know. If you change just some of the picture, does it only recompress the changed part? I opened that first "Saved for Web" and changed the white background/surround to blue and saved. That result was 258.6K. I’m not sure what that means.

I don’t want to get into a real technical discussion here – you can look up all you can possibly want to know about JPEG format on the web – but some groups of colors compress better than others (just as some show more artifacting due to the way JPEG selects which information to throw away).
NH
Nicolas Hoch
Feb 12, 2005
Save as 25% JPEG= 68 kB
Open 25% jpeg and save as 100% = 262 kB*

I noticed the same thing. Now how come the file size is increasing? If you open a 25% JPEG and save it at 100% it should have something like 24% of the original PSD, right? Why 262 kB?
Nico
H
Hecate
Feb 13, 2005
On Sat, 12 Feb 2005 19:41:19 +0100, "Nicolas Brentz" wrote:

Save as 25% JPEG= 68 kB
Open 25% jpeg and save as 100% = 262 kB*

I noticed the same thing. Now how come the file size is increasing? If you open a 25% JPEG and save it at 100% it should have something like 24% of the original PSD, right? Why 262 kB?
Nico
Wrong.

Let’s say you open an image that is 2000 by 2000 pixels. Photoshop decompresses the jpg to give you the full pixel range to work on. You alter some of the colours, introducing more colours to the image. Now you save. What size is the image? It’s still 2000 x 2000 pixels. That hasn’t changed. What has changed is the introduction of new colour information. You now have more information in the file in terms of colour than you had before (don’t forget – no "new" pixels). What do you think the size is going to be compressed to – the same? Smaller? Larger?

I’ll leave that for you as an exercise.

You really need to read about how jpg compression works.



Hecate – The Real One

veni, vidi, reliqui
GF
Greyson Forkyurner
Feb 13, 2005
*The file size in each case has increased, but the QUALITY has NOT increased. Once you have compressed the image you can not restore pixels.
I guess I could do the same test with TIFFs but the point is that once
lost,
lost forever. Always save the original uncompressed image if there is any chance that you will want to edit it one day.

No, Tiffs use lossless compression – an LZW compressed image decompresses perfectly, if slowly. JPG always causes artefacts, mainly in the blue channel.

It’s fine once the edit process is complete, tho’.

HTH

GF
N
nomail
Feb 13, 2005
Hecate wrote:

On Sat, 12 Feb 2005 19:41:19 +0100, "Nicolas Brentz" wrote:

Save as 25% JPEG= 68 kB
Open 25% jpeg and save as 100% = 262 kB*

I noticed the same thing. Now how come the file size is increasing? If you open a 25% JPEG and save it at 100% it should have something like 24% of the original PSD, right? Why 262 kB?
Nico
Wrong.

Let’s say you open an image that is 2000 by 2000 pixels. Photoshop decompresses the jpg to give you the full pixel range to work on. You alter some of the colours, introducing more colours to the image. Now you save. What size is the image? It’s still 2000 x 2000 pixels. That hasn’t changed. What has changed is the introduction of new colour information. You now have more information in the file in terms of colour than you had before (don’t forget – no "new" pixels). What do you think the size is going to be compressed to – the same? Smaller? Larger?

I believe his point is that if you open a JPEG image that was compressed at 25% quality, and then you "Save as…" again with 100% quality, the file size is bigger. That applies even if you did not change anything in the image, you just opened and saved.


Johan W. Elzenga johan<<at>>johanfoto.nl Editor / Photographer http://www.johanfoto.nl/
R
Ragnar
Feb 13, 2005
"Johan W. Elzenga" wrote in message
<snip>
I believe his point is that if you open a JPEG image that was compressed at 25% quality, and then you "Save as…" again with 100% quality, the file size is bigger. That applies even if you did not change anything in the image, you just opened and saved.

Correct. That was my point.
Clearly there is more ‘digital information’ in the file but not more ‘image information’. If you open the 25% image and save it again as 25% without editing it, the file size remains the same. If you do some editing, the file size will be similar but not the same (I just tried it, to be sure of what I was saying).
You can do little tests like this endlessly, but the main point must be, if you are in the habit of fiddling with your images after finishing them, keep the original PSD version and edit that – do NOT work on previously compressed Jpegs.

John
H
Hecate
Feb 14, 2005
On Sun, 13 Feb 2005 10:47:59 +0100, (Johan W.
Elzenga) wrote:

I believe his point is that if you open a JPEG image that was compressed at 25% quality, and then you "Save as…" again with 100% quality, the file size is bigger. That applies even if you did not change anything in the image, you just opened and saved.

OK> Well, it’s understandable depending on the image. If you’ve opened the image more than once I would think it’s quite likely that the compression artifacts compression (if you see what I mean) would add to the image size. No doubt a trawl of the jpeg spec would illuminate the issue.



Hecate – The Real One

veni, vidi, reliqui
N
nomail
Feb 14, 2005
Hecate wrote:

I believe his point is that if you open a JPEG image that was compressed at 25% quality, and then you "Save as…" again with 100% quality, the file size is bigger. That applies even if you did not change anything in the image, you just opened and saved.

OK> Well, it’s understandable depending on the image. If you’ve opened the image more than once I would think it’s quite likely that the compression artifacts compression (if you see what I mean) would add to the image size. No doubt a trawl of the jpeg spec would illuminate the issue.

I doubt that compression artefacts are the cause of this. The artefacts are caused by the compression, so why would they cause a problem the next time? Besides, it ALWAYS happens in my experience.

To me, the explanation is simple: Compare JPEG-compression to squeezing a sponge. You can squeeze it hard, let it expand again and then queeze it again, but less hard. Same sponge, but bigger the second time.


Johan W. Elzenga johan<<at>>johanfoto.nl Editor / Photographer http://www.johanfoto.nl/
H
Hecate
Feb 14, 2005
On Mon, 14 Feb 2005 13:02:11 +0100, (Johan W.
Elzenga) wrote:

Hecate wrote:

I believe his point is that if you open a JPEG image that was compressed at 25% quality, and then you "Save as…" again with 100% quality, the file size is bigger. That applies even if you did not change anything in the image, you just opened and saved.

OK> Well, it’s understandable depending on the image. If you’ve opened the image more than once I would think it’s quite likely that the compression artifacts compression (if you see what I mean) would add to the image size. No doubt a trawl of the jpeg spec would illuminate the issue.

I doubt that compression artefacts are the cause of this. The artefacts are caused by the compression, so why would they cause a problem the next time? Besides, it ALWAYS happens in my experience.
To me, the explanation is simple: Compare JPEG-compression to squeezing a sponge. You can squeeze it hard, let it expand again and then queeze it again, but less hard. Same sponge, but bigger the second time.

Try getting a jpg and compressing it with say zip. Note how in a lot of cases the file size increases.



Hecate – The Real One

veni, vidi, reliqui
N
nomail
Feb 15, 2005
Hecate wrote:

OK> Well, it’s understandable depending on the image. If you’ve opened the image more than once I would think it’s quite likely that the compression artifacts compression (if you see what I mean) would add to the image size. No doubt a trawl of the jpeg spec would illuminate the issue.

I doubt that compression artefacts are the cause of this. The artefacts are caused by the compression, so why would they cause a problem the next time? Besides, it ALWAYS happens in my experience.
To me, the explanation is simple: Compare JPEG-compression to squeezing a sponge. You can squeeze it hard, let it expand again and then queeze it again, but less hard. Same sponge, but bigger the second time.

Try getting a jpg and compressing it with say zip. Note how in a lot of cases the file size increases.

So?


Johan W. Elzenga johan<<at>>johanfoto.nl Editor / Photographer http://www.johanfoto.nl/
H
Hecate
Feb 16, 2005
On Tue, 15 Feb 2005 13:09:38 +0100, (Johan W.
Elzenga) wrote:

So?

Recompression can add to the file size of previously compressed files.



Hecate – The Real One

veni, vidi, reliqui
NH
Nicolas Hoch
Feb 27, 2005
If you open the 25% image and save it again as 25% without editing it, the file size remains the same.

Ah, that means the image "knows" its compression level? I thought, if I open a JPEG that was compressed at 25%, and save it without editing at 100% it should be 100% (or maybe 99% since it is always lossy) of the 25%, there it should have about the same file size.

If – like you are saying – I get about the same quality if I re-save a 25% compressed jpeg at 25%, why should there be an option to choose more than 25%. Doesn’t make sense to me..

Thanks,
Nico
D
Dave
Feb 27, 2005
If you open the 25% image and save it again as 25% without editing it, the file size remains the same.

on which calculator is this calculation done?
If you open the 25% image and save 25% of the 25% image
you will be left with a quarter of a quarter of course

Dave
NH
Nicolas Hoch
Feb 28, 2005
If you open the 25% image and save 25% of the 25% image
you will be left with a quarter of a quarter of course

Yes, that’s what I initially thought. But John says:
‘If you open the 25% image and save it again as 25% without editing it, the file size remains the same.’

( I just noticed that he wrote ‘as’ 25%. I thought he wrote ‘at’. Maybe he meant re-saving a 25% image at full quality ) But that’s not an explanation for the increasing file size then.
Nico

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections