[Digikam-users] jpg to png conversion
Remco Viƫtor
remco.vietor at wanadoo.fr
Fri Jan 13 14:28:27 GMT 2012
On Friday 13 January 2012 14:56:42 Dr. Martin Senftleben wrote:
> Hi,
>
> Am 13.01.2012 10:25, schrieb Andrew Goodbody:
...
> >
> > I have to ask why you converted jpg files to png?
>
> I'm not sure if that's a rhetorical question. Anyway, I was doing some
> changes on the images, and didn't want to lose more info due to the
> jpg-compression.
> I think of it this way (maybe I'm wrong): every time I change a jpg
> image, some info of the origional gets lost and the image cannot ever
> be put in the original state by just reverting the changes, because it
> drops the original info and adds in some new based on the changes.
> But (that's what I think) when I change a png image, I can get the
> original state back by reverting the changes.
Not quite sure about that, as you will still have rounding errors (as PNG uses
8 or 16 bits per colour channel).
> I knew that png makes the files bigger, but I still do not understand
> how the jpg can become 10 times bigger by converting it to png.
One reason is that png images can have an alpha (transparency) channel. The
other is that jpeg (depending on settings when saving) can throw away a lot of
information.
> Even
> the raw images of the same picture are less than half the size of the
> png file.
A raw file has 12 (or 14) bits/pixel. An 8-bit/channel png image has 24/32
bits/pixel (the higher value of each pair if there's an alpha channel).
Also, a raw file has no or less colour space information embedded. And, (part
of) the metadata might be decoded and stored in a more readable format (maker
data notably), not to mention the metadata you added (and that is stored as
text/XML, like tags, captions, titles, use rights, ...) But those things
shouldn't add all that much, compared to the increase in bits/pixel (which
doubles the information to be stored)
> I'll probably never fully understand the mysteries behind this,
> because I can't even see the difference. I'll probably stick to jpg
> even though some information is not stored in the file. Why don't
> camera manufacturers use a non-lossy format that produces smaller
> images than the raw images? Or isn't that possible at all?
They could use a lossless compression algorithm (and I think some do), but
then again, that takes time and processing power, both of which are in short
supply inside a camera.
Remco
More information about the Digikam-users
mailing list