[Digikam-users] re JPEG lossiness, PNG
Remco Viƫtor
remco.vietor at wanadoo.fr
Sat Jan 21 19:49:57 GMT 2012
On Saturday 21 January 2012 19:58:22 Simon Oosthoek wrote:
> This is why PNG and JPG2000 are popular choices; they allow 16-bit
> values to be preserved and allow lossless compression (meaning it is
> reversible to "RAW" in theory)
No, it is not: RAW files have as many pixels as the resulting PNG files (in
theorie at least), but each represents only one colour channel out of three
(or four*). The different colours are arranged in a matrix (Bayer matrix), so
that a square of 4 pixels has the three colours, with green being present
twice.
To get the image on which we work (and which is stored as PNG or whatever),
those colours are interpolated, so the original values are replaced by
calculated values, and the missing colours are added for each pixel.Due to
this interpolation, there is no guarantee that you can recover the original
values.
Note that the term "lossless" as applied to a compression algorithm only
implies that the compression is reversible. RAW -> PNG is a bit more than just
a compression, and there is no guarantee that all steps are reversible.
*: certain systems use 2 different greens
More information about the Digikam-users
mailing list