[extropy-chat] Re: codes in scam letters

Emlyn emlynoregan at gmail.com
Thu Sep 29 00:57:34 UTC 2005


On 29/09/05, Mike Lorrey <mlorrey at yahoo.com> wrote:
> --- Emlyn <emlynoregan at gmail.com> wrote:
>
> > This assumes that a compressed image I produced by program A will be
> > bitwise identical to Compress(Uncompress(I)) using the same program.
> > It isn't clear to me that with lossy compression, you can safely say
> > I == Compress(Uncompress(I)). DTP professionals will agree I think.
> >
> > I just tried this with a commercial program. I opened a bitmap image
> > and saved it as a jpeg. I closed the program, then reopened the
> > program. I opened the jpeg, did nothing to it, saved it as a new
> > file,
> > with exactly the same compression settings (which had stayed as
> > defaults, so in effect I touched nothing).
> >
> > Then I compared the two images. The windows program "comp" told me to
> > go away because they were different sizes. It turns out that they
> > were
> > 24.8KB and 24.7KB respectively (I didn't look any closer than the
> > file properties dialog).
> >
> > So in this case, I != Compress(Uncompress(I)).
>
> What you did was a double compression. Since the JPG is already
> compressed, if you save it again under a new file name with the same
> compression settings, it will compress an already lossy picture to
> another level of compression. This is a function of the jpg compression
> algorithm (i.e. GIF format won't do this, even though it is also a
> compressed format.)
>

I don't think that's quite accurate, Mike. GIF just isn't lossy, while
jpg is. The application uncompresses the jpg, then recompresses it, so
the image is compressed once (it not like it's nested jpg encoding or
anything), but has been compressed twice is total, in some ways like a
photocopy of a photocopy. That was the point. Lossy compression

OTOH, GIF is lossless. So you can always say I=Compress(Uncompress(I)) for gif.

--
Emlyn

http://emlynoregan.com   * blogs * music * software *



More information about the extropy-chat mailing list