Go Back   Steve's Digicams Forums >

LinkBack Thread Tools Search this Thread
Old Sep 16, 2004, 11:50 PM   #1
jhallgren's Avatar
Join Date: Apr 2004
Posts: 66

I have a 1024x768 image from camera...resized it down to 800x600 via MS Photo Editor

Saved it both as 80% quality factor (making module with 57,344 bytes and 62,244 unique colors according to IrFanView) and 85% factor (module 69,313 bytes and 63,030 colors)...

Ok...so since the pix is same size in both and for an extra 800 or so colors, it takes 12K more?

What exactly does the difference in factors do to the pix? And when i save it with 100%, it makes a file BIGGER than what I started with? I'm confused....

And is there a way to tell what quality factor a JPG was saved with?
jhallgren is offline   Reply With Quote
Sponsored Links
Old Sep 17, 2004, 12:15 AM   #2
Senior Member
eric s's Avatar
Join Date: Dec 2002
Posts: 5,803

You have to understand how JPG works. This is at least part of how I think it works. I wouldn't be surprised if I make a mistake, but I'm sure others will jump in.

Among other things, JPG uses distructive compression. What that means is that it changes the data in the picture to make it compress more. I don't know if 100% JPGs means no distruction or not.. I think even then it still alters the picture some.

You should view the % factor as how aggressively it alters the picture to make it compress more. The higher the number the more like the original it is (less alterations.) For example, a blue sky is not really all one color. Faint wisps of cloud or lightening as it gets closer to the sun... that stuff. But if you increase the compression (reduce the %) it changes the color of the sky to be more of the same color so it compresses better. It destroys details.

Now, in some pictures that doesn't really matter. Pictures with a lot of out of focus areas don't really have details to loose. Or a human face... we all know generally what they look like. If some of the detail in the face is lost, we mentally fill it in without realizing. But a landacape with confier trees will look weird if the pine needles are all kinda mushy into a green blob.

Does that help?

As for why the picture is larger at 100%... what format was the picture before? If it was JPG, I can't explain it. I believe that the same % will produce different results with different software. But that isn't your question. Also, some software stripps off extra data from the picture (EXIF data) which can make it smaller. If it added it back in, then it would be larger.

There is no hard and fast rule of what % to save at. Its really picture dependent. Because of that, I really just save it based on the size of the image. I want to make downloads reasonable for others.

eric s is offline   Reply With Quote
Old Sep 17, 2004, 8:43 PM   #3
Jurgen Eidt's Avatar
Join Date: Apr 2004
Posts: 76

The Jpeg compression transforms blocks of size 8x8 pixels using the discrete cosinus transform. A loss less transformation from the spatial domain to the frequency domain. Each of these 64 (8x8=64) transformed values are then scaled. This is were the loss comes in. When you save with best quality (level 12 in PhotoShop) there is no scaling done on the coefficients. Scaling is not linear. The formula below 50% and above 50% is different.

The more you scale down the coefficients the more of these will be close to zero. When all the coefficents gets compressed they get rounded down to the nearest integer. Most of them will 0 eventually and compress rather well!

With this knowledge in the background now to your question: You save the resized image with 80% (remember this is the scaling factor). A lot of coeffients gets down to 0 and the compressed file size is small. Now you doa 85%. Not so many gets 0 and the file size gets a little bigger. In your case the 5% makes 12KB.

If you you save the resized at 100%, you store actually unnecessary data because your original picturewas not stored at a 100. Thats why it is larger than the original.

Jurgen Eidt is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -5. The time now is 12:46 AM.