Re: BGRA, ARGB, etc. suggestion

Glenn Randers-Pehrson <[email protected]>
Newsgroups gmane.comp.graphics.png.general
Message-ID <CA+PdXctpGNhQFWbc=cX2drHr=U55aDFPBShRSWZvSHJoSy4BkQ@mail.gmail.com>
On Mon, Dec 21, 2015 at 11:18 AM, John Bowler <
[email protected]> wrote:


> [...] 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.
>

Ridiculous accuracy and dynamic range can be achieved with the
pCAL chunk.

Quoting from the pCAL spec in the png extensions document:

    Using equation type 3, floating-point data can be reduced (with loss)
   to a set of integer samples such that the resolution of the stored data
   is roughly proportional to its magnitude. For example, floating-point
   data ranging from -10^31 to 10^31 (the usual range of 32-bit
   floating-point numbers) can be represented with:
   Equation type 3
   x0 = 0
   x1 = 65535
   p0 = 0.0
   p1 = 1.0e-30
   p2 = 280.0
   p3 = 32767.0

   The resolution near zero is about 10^-33, while the resolution near
   10^31 or -10^31 is about 10^28. Everywhere the resolution is about 0.4
   percent of the magnitude.

   Note that those floating-point parameters could be stored in the chunk
   more compactly as follows:
   p0 = 0
   p1 = 1e-30
   p2 = 280
   p3 = 32767

Glenn

------------------------------------------------------------------------------

_______________________________________________
png-mng-misc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/png-mng-misc
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.