f



Progressive JPEG and file size?

Can anyone explain why progressive JPEG image is usually smaller than
same image saved as non-progressive JPEG? If I have understood right
the progressive JPEG has the same data as non-progressive JPEG, only
the order of data is changed. So non-progressive JPEG contains
DCT-blocks encoded in zigzag-scanning order and progressive JPEG first
saves DC-coefficients of each block, then AC-coefficients. Why latter
seems to be more optimal than the first one? Changes in file sizes can
be significant with some images.

And can anyone explain this: I save an image which contains lots of
detail using non-progressive and progressive JPEG -> Non-progressive
JPEG file is a bit larger than progressive one. But if I make strong
gaussian blur (10 pixels radius) to original picture -> Progressive
JPEG is way larger.


-DA
0
darkaphex
9/26/2004 5:10:20 PM
comp.compression 4696 articles. 0 followers. Post Follow

3 Replies
2096 Views

Similar Articles

[PageSpeed] 23

Hello,

You have hit on the right direction of the reason, the organization of a
progressive JPEG file allows it to be stored (huffman compressed) just a bit
more efficiently.  Not in all cases, but most.  Plus, there are lossless
converters out there that allow to move between progressive and baseline
JPEG without damage.

Hope this helps,
jack
--
Pegasus - BETTER DIGITAL IMAGING!
http://www.pegasusimaging.com/

"Drk Afx" <darkaphex@luukku.com> wrote in message
news:46c2ed46.0409260910.3b7dea41@posting.google.com...
> Can anyone explain why progressive JPEG image is usually smaller than
> same image saved as non-progressive JPEG? If I have understood right
> the progressive JPEG has the same data as non-progressive JPEG, only
> the order of data is changed. So non-progressive JPEG contains
> DCT-blocks encoded in zigzag-scanning order and progressive JPEG first
> saves DC-coefficients of each block, then AC-coefficients. Why latter
> seems to be more optimal than the first one? Changes in file sizes can
> be significant with some images.
>
> And can anyone explain this: I save an image which contains lots of
> detail using non-progressive and progressive JPEG -> Non-progressive
> JPEG file is a bit larger than progressive one. But if I make strong
> gaussian blur (10 pixels radius) to original picture -> Progressive
> JPEG is way larger.
>
>
> -DA


0
Jack
9/26/2004 7:33:53 PM
Drk Afx wrote:
> 
> Can anyone explain why progressive JPEG image is usually smaller than
> same image saved as non-progressive JPEG? If I have understood right
> the progressive JPEG has the same data as non-progressive JPEG, only
> the order of data is changed. So non-progressive JPEG contains
> DCT-blocks encoded in zigzag-scanning order and progressive JPEG first
> saves DC-coefficients of each block, then AC-coefficients. Why latter
> seems to be more optimal than the first one? Changes in file sizes can
> be significant with some images.

Progressive JPEG has two different coding features:
1. Spectral Selection
2. Successive Approximation
What you describe is just the first feature (first DC, then AC bands).
However, it is the second feature which is the major reason for
different coding efficiency of Progressive JPEG.
With Successive Approximation, you first store the higher bits of
the coefficients (low precision, coarse image), then the lower bits
(high precision, detailed image).
In usual images, the noise is concentrated in the lower bits.
Therefore, the Huffman encoder can be more efficient in symbol
coding in the higher bit range where less noise is.
The Successive Approximation coding thus *separates* the noise
from the image, and that is the reason for better coding efficiency
(noise is hardly compressible).   

> And can anyone explain this: I save an image which contains lots of
> detail using non-progressive and progressive JPEG -> Non-progressive
> JPEG file is a bit larger than progressive one. But if I make strong
> gaussian blur (10 pixels radius) to original picture -> Progressive
> JPEG is way larger.

The more noise (detail) the image has, the better the coding efficiency
of Progressive JPEG.
The less noise (blur) the image has, the better the coding efficiency
of Sequential (Non-progressive) JPEG.

Note that most Progressive JPEG coders use a mixture of Spectral
Selection coding and Successive Approximation coding.
For better coding efficiency, mainly Successive Approximation is
relevant, and you can try to find optimal Successive Approximation
paramters (the point where to separate the precision - Ah/Al in the
JPEG standard) for your class of images.
For example, I sometimes found an optimal point Al=4 for my images
(4 lower bits separately coded).

Regards
Guido
0
Guido
9/27/2004 8:24:00 AM
darkaphex@luukku.com (Drk Afx) wrote in news:46c2ed46.0409260910.3b7dea41
@posting.google.com:

> Can anyone explain why progressive JPEG image is usually smaller than
> same image saved as non-progressive JPEG? 

The reason it can be smaller is that sequental jpeg is encoded 8x8 block at 
a time. Progressive JPEG encoding can extend across 8x8 blocks. Thus you 
can encode much longer zero runs.
0
Flavius
10/30/2004 12:50:29 AM
Reply: