kosher jpgs

R

Roedy Green

I noticed that winzip sometimes issues a warning message that it can't
compress a jpg with its proprietary jpg compression method. This
suggests that some of my jpgs are not completely kosher.

This lead be to wonder if there is some java code to detect if jpgs
are completely kosher, ditto pngs, and possibly correct them if not.

Alternatively, perhaps some utility will do this.

I also wondered what it might be about the images that Winzip does not
like.
 
D

Daniel Pitts

Kenneth said:
This made me wonder.. how much more can you really expect to compress
a .jpg file? It is already compressed using a lossy compression
algorithm. Would taking on another lossless compression algorithm on top
really buy you much if anything?
All compression ratios are inversely proportionate to entropy. Lossy
compression allows you to throw out entropy, while lossless only
minimizes non-entropy data. Lossy compression may result in in some
data that still has some non-entropy in it.
 
M

Martin Gregorie

I noticed that winzip sometimes issues a warning message that it can't
compress a jpg with its proprietary jpg compression method. This
suggests that some of my jpgs are not completely kosher.
Correct: you can't compress a JPEG image because its already compressed.

I've often zipped a set of JPEGs before e-mailing them. The ZIP file is
never smaller than the total JPEG size, indeed its often slightly bigger,
but its usually much easier and quicker to save and unzip one file than
it is to save 10-20 separate image files. The same will apply to a jar
file since it uses the same compressed archive structure as ZIP.
I also wondered what it might be about the images that Winzip does not
like.
PKzip doesn't do this, so at a guess its just Winzip annoying you by
being 'helpful'.
 
A

Arne Vajhøj

Kenneth said:
This made me wonder.. how much more can you really expect to compress
a .jpg file? It is already compressed using a lossy compression
algorithm. Would taking on another lossless compression algorithm on top
really buy you much if anything?

Somewhere between a small gain and a small loss. Not worth to zip
for the compression. But it could be done just to bundle multiple
files.

Arne
 
N

Nigel Wade

Roedy said:
I noticed that winzip sometimes issues a warning message that it can't
compress a jpg with its proprietary jpg compression method. This
suggests that some of my jpgs are not completely kosher.

Have you really checked what's going on?

What it probably means is that attempting to compress the JPG created a file
which was actually bigger than the original. This is not uncommon when
attempting to compress already compressed data. IIRC WinZip will report this by
saying that it can't compress the file (which is technically accurate, if
somewhat misleading).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top