Usenet.com

www.Usenet.com

Group Index

Rec Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: Crop JPEG without decreasing quality



Nicolas Mittelmaier wrote:

> Does this mean, that I can actually "upscale" the compression of a
> saved jpeg ??? A jpeg with 75% quality can be saved to 100% of the
> original again?

No, that's technically impossible.

Sorry about the confusion, I see that my explanation wasn't really an 
explanation. I'll try again with an example:

1) We have the original raw bits produced by your scanning. Let's say 
that there is 1000x1000pixels in 24bit color. The uncompressed size is 
3MB.

2) You compress this to a 75% JPEG using XnView. The compressed size is 
150KB.

3) You open the JPEG, crop a bit and save as 100% JPEG. The size jumps 
to 400KB.

Now, one reasoning would be "There's only 150KB's worth of data left 
after step 2. When I take something away (crop), there should be even 
less". It does make sense for GIFs, PNGs, TIFF with LZW or other 
formats that compresses losslessly, but JPEG is different.

When a JPEG is decompressed, the result is a 24bit image (unless you're 
using grayscale JPEGs, but let's forget that for now). Some information 
was lost at step 2, but that process isn't as simple as just reducing 
colors.

For your program it's simple: It just opened an image and now has 
1000x1000pixels at 24bit to work with. When you react step 3 it just 
saves that image as if it were any 1000x1000pixel 24bit image.


Hmm... Not sure if that helped. I recommend reading the JPEG FAQ 
instead (see below).

> I thought that using 100% on a 75% quality-jpeg
> would nearly (!) result in the "full" 75% image again...

That understanding is quite correct.


The "100%" is quite a source of confusion. It isn't 100%, it's just the 
end of the scale for the program you're using. It might as well state 
"Highest quality this program provides".

It certainly isn't 100% of the original image, unless the program 
supports lossless JPEGs. Those programs that do that tend to state so 
quite clearly. Lossless JPEGs aren't really that usefull, as the 
support for such beasts are not very widespread.

I recommend taking a look at
http://www.faqs.org/faqs/jpeg-faq/part1/preamble.html
if you want more information on JPEGs.



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.