[Digikam-users] png huge

Paul Hartman paul.hartman+gentoo at gmail.com
Tue Jan 19 17:00:38 GMT 2010


Hi Martin,

On Tue, Jan 19, 2010 at 10:45 AM, Martin Senftleben
<DrMartinus at drmartinus.de> wrote:
> Hi,
>
> with the many replies to my question I still believe I haven't been
> understood properly, even though I am very grateful for the replies
> which helped me to understand things better.
>
> I recall the situation or my question:
> from a jpg image file, a png image file is created. The jpg file can
> contain only what is stored in it, right? The compression method is
> lossy, so whatever is stored in there isn't complete already. This is
> also - in my view - proven by the png that results when I transfer the
> jpg file to the png format: they look absolutely alike, the png image
> is in no way better than the "original" jpg image, it's only about 5
> times larger.

Correct. If you simply open a JPG and save as a PNG, you gain no
benefits. The PNG will be larger without giving you any advantage.

> The source of the png file is not the original raw image, but the
> lossy compressed jpg file. Is it possible for the png to extract more
> from the jpg file than there is in it? Or is it actually possible to
> revert the compression made by the jpg format to get basically the raw
> image (I doubt that, because then the jpg format wouldn't have lost
> any of the original info)? If that's the case, I would understand, but
> so far I couldn't read that from your replies.

You never get the original image back from the JPG (only a similar
image), but if the RAW was saved first as PNG then you could get
exactly the same image back from the PNG. So that is the advantage of
PNG compared to JPG.

Still, if you edit your JPG it is often better to save as PNG (or any
lossless format) because every time you save JPG it is losing more
data.*

* exception is some simple tasks like crop and rotate, there are tools
to do these things losslessly in JPG. jpegtran is the main one but
there are many more:
http://jpegclub.org/losslessapps.html

> Sorry if I appear a bit dumb on this...

Not dumb, it is confusing and I think you understand it now more than
before. :) In fact the same question was discussed in the GIMP mailing
list in the last few days.

Paul



More information about the Digikam-users mailing list