What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Where do kb's come from when resaving photos.


Lynny

Well-Known Member
Messages
71
Likes
0
When you save a photo at as a jpg, quality setting 5 medium, close the photo, open it again, and "save as" it at quality setting 12 high, where do the extra kb's in file size come from.

I mean I know they were there when the photos was first saved at 12, but they went somewhere when saved at 5, (this makes sense) but I never understand where photoshop finds these kb again, when it's resaved at 12.....

The photo itself must be degraded, from saving at 5.... isn't it? Does it also mean that when it's resaved at 12 the high quality of the photo is restored? I wouldn't have thought so, otherwise would we always be told to be so careful with our images, and to keep a copy of the original.

If anyone can answer this I would be forever greatful, I ask it every now and then, but haven't had a satisfactory reply.

Lynny
 
Oh, but the answer is quite simple.

See, you have to look at it from a Photoshop point of view. With whatever quality you'll save, the number of pixels will never change in Photoshop, since it's determined by the height and width of your document.

So if you open a 100x100 pixels file in Photoshop, then it will always have 10,000 pixels, and it makes no difference if you originally saved it with quality 1 or 10. The Jpeg algorithm has to add pixels that weren't there in the first place, to bring the total up to 10,000, before you can open the file.

The moment you decide to save this 10,000 pixels document with a quality setting of 12, well then you now also understand that the JPEG size will be bigger.
Seems to be all very logical or not ;)
 
I don't know the exact Jpeg algorithm, but it might be close to this;

Take 4 pixels, all with a different color, but still close to each other.
Average all colors to one unique color and save only this information.
The moment you'll open this Jpeg, there's probably something in the header (depending on your quality setting) how big the "squares" are, in this case a 2x2 pixels square. It's not 100% exactly how JPeg works, but you'll get an idea ;)

That's the reason why a compression format like ZIP achieves such high compression rates with Text documents, because instead of saving 100 blanks, it only saves the information 100 and the ASCII value for blank which is 32. It's telling Winzip when it tries to unpack this file; "100 blanks are coming".
 
Makes perfect sense to me G-Man! ;)

Great explanation! :perfect:
 
Or, to put it another way, When you save at 5, the image degrades. ( alot)
it does this to a certain degree every time you save as a JPG, even at maximum quality.

When you reopen the degraded image again, Photoshop only sees the number of pixels in the image, so it`s full sized (Kb) again. The program doesn`t care whether it`s a crappy looking image or not. Doesn`t know the difference.

If it did, it wouldn`t need us.

:)
 

Back
Top