Re: BGRA, ARGB, etc. suggestion

John Bowler <[email protected]>
Newsgroups gmane.comp.graphics.png.general
Message-ID <CAP7U39-1HDVpiajQTWTk_58ReiDxZbaOXUuTCoqr7J+h=Y6Hdw@mail.gmail.com>
On Mon, Dec 21, 2015 at 5:13 AM, Glenn Randers-Pehrson
<[email protected]> wrote:
>
> It's in the glossary.  The glossary even survived the ISO editing (it's called "abbreviated terms" there).

Ah!  Thank you; yes, 3.1.21 (in the ISO spec) completely defines it,
because it leads to 'luminance' and that uses a CIE specification:

3.1.28 luminance
formal definition of luminance is in [CIE-15.2]. Informally it is the
perceived brightness, or greyscale level, of a colour. Luminance and
chromaticity together fully define a perceived colour.

So a color type 0 (greyscale) PNG is not just a 2-D array of sample
values, the sample values are defined to be perceptual brightness
values and, therefore, will fit in 16 bits.  See the discussion in
pngrtran.c (1.7) that starts around line 1800; if my math is correct
this indicates that a gamma of 36 is a reasonable value for original
perceptual data stored with ridiculous accuracy and dynamic range.

It's probably worth adding that the obvious encoding of perceptual
brightness using a log scale, as suggested by at least one expert many
years ago and as partially implemented in SLog encodings, requires
only 12 bits.  Also the only primary source I've found on the accuracy
required suggests that human perception peaks at about 1/60; we can't
discriminate brightess changes below 1 part in 60 even on a very wide
area in optimal conditions.  The obvious 12-bit encoding using a 10^14
range of brightness gives an encoding accuracy of slightly better than
1/120.

John Bowler

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.