Gamma in PNG

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, xnview

Post Reply
Solovei95
Posts: 16
Joined: Tue Mar 29, 2011 11:14 am

Gamma in PNG

Post by Solovei95 »

It does not work PNG gamma correction
User avatar
xnview
Author of XnView
Posts: 34072
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Gamma in PNG

Post by xnview »

Solovei95 wrote:It does not work PNG gamma correction
You means that gamma in PNG are not used?
Pierre.
Solovei95
Posts: 16
Joined: Tue Mar 29, 2011 11:14 am

Re: Gamma in PNG

Post by Solovei95 »

XnView does not work native gamma correction in PNG.
The simplest formula is:
pow (channel/255, 1 / (gamma * 2.2));

gamma - gamma from PNG gAMA chunk
channel - RGB channel
User avatar
DOS386
Posts: 291
Joined: Sun Jun 11, 2006 2:43 pm

Re: Gamma in PNG

Post by DOS386 »

Solovei95 wrote:XnView does not work native gamma correction in PNG.
The preferred colorspace is sRGB anyway, not pow(unpredictable random value).

http://libpng.org/pub/png/book/chapter1 ... ch10.div.6

http://libpng.org/pub/png/spec/1.2/PNG- ... tml#C.sRGB

http://en.wikipedia.org/wiki/SRGB
There is indeed no WinZIP under my rock.
User avatar
XnTriq
Moderator & Librarian
Posts: 5617
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Gamma in PNG

Post by XnTriq »

Post Reply