RSS/Atom feed Twitter
Site is read-only, email is disabled

File gamma 0.4545? And pnmtopng.

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

File gamma 0.4545? And pnmtopng. Juhana Sadeharju 30 Sep 19:53
  File gamma 0.4545? And pnmtopng. Sven Neumann 30 Sep 22:31
Juhana Sadeharju
2009-09-30 19:53:34 UTC (over 15 years ago)

File gamma 0.4545? And pnmtopng.

What an earth. I found that GIMP has placed file gamma 0.4545 to PNG images without my will.

$ xloadimage x.png x.png is 1120x840 PNG image, color type RGB, 8 bit, file gamma 0.4545

The image is displayed too dark. The brighter image is correct because xloadimage shows the original x.ppm that way.

I found this problem only now because GIMP, eog, gqview, and webbrowsers ignores the file gamma. Is it wrong to ignore the file gamma?

How to delete the file gamma with GIMP or with command line converters? What "convert -gamma 1.0" would do for x.png? (1) Fix the file gamma to 1.0? (2) Modify the pixel values? Similar questions about GIMP and other programs.

How to configure GIMP to not set the file gamma? I have never set the gamma value. I have always wanted 1:1 correspondence between the file and the display. Who GIMP developer uses 0.4545 gamma? :-)

BTW, I remade the png by not using GIMP: cat x.ppm | pnmtopng > x.png

$ xloadimage x.png x.png is 1120x840 PNG image, color type PALETTE, 8 bit

The PNG image should be RGB, not PALETTE! Somebody should fix the pnmtopng.

Juhana

Sven Neumann
2009-09-30 22:31:32 UTC (over 15 years ago)

File gamma 0.4545? And pnmtopng.

Hi,

On Wed, 2009-09-30 at 20:53 +0300, Juhana Sadeharju wrote:

What an earth. I found that GIMP has placed file gamma 0.4545 to PNG images without my will.

$ xloadimage x.png x.png is 1120x840 PNG image, color type RGB, 8 bit, file gamma 0.4545

As far as I know PNG expects the gamma to be set to the gamma correction of the PNG file based on the screen gamma i.e. the display exponent. That would be 1/gamma then. GIMP sets the gamma value 2.2, which is the gamma value for the sRGB color space.

How to configure GIMP to not set the file gamma?

Do not check the checkbox labeled "Save gamma" in the PNG save dialog.

Sven