POV-Ray : Newsgroups : povray.beta-test : PNG output much brighter than preview... : Re: PNG output much brighter than preview... Server Time
29 Apr 2024 12:06:40 EDT (-0400)
  Re: PNG output much brighter than preview...  
From: Eero Ahonen
Date: 16 Jan 2007 14:37:58
Message: <45ad2996@news.povray.org>
[Followed Daniel, by setting follow-ups to .general]

Warp wrote:
>   Gamma correction in PNG causes lots of problems. For instance, if
> you want to make a web page with a certain backtround color and add
> a PNG image which uses that exact same color, you can blame gamma
> correction for the fact that often you won't. 

Possibly surprisingly that's handness of the web developer. PNG supports
transparency, so there actually should be no real need to get the same
background color as at the page.

Fortunately for you JPG's are usually far more practical on the web,
while they take up less space.

> If there's no gamma correction, some browsers will guess a gamma
> correction (screwing up the colors) while others will take the pixels
> unmodified.

I quickly checked the PNG specs and seems the specified way is to guess
the gamma. I'm not sure if it's a good idea.

> In one browser it may look good, in another it may not.

That's pretty common on webpages these days. :(

>   The PNG standardization organization screwed up. They gave unwise
> rules on what to do when a png file has no gamma information. 

Yes, but...

> Some programs follow this rule, others don't. 

...it's still specsed, so every program should follow the rule. The
final colors would vary less.

> What is worse, if there *is* gamma info, some programs will read it, others won't. 

This certainly is no PNG standardization group's fault, some programs
just act wrong.

> Thus you might
> get even 4 different results depending on the gamma info and the
> program.

No, there's 3 choices, since not reading the gamma info and missing the
gamma info should result the same:

1) Gamma is correct (gamma is presented and used)
2) Gamma is guessed (gamma is missing or hasn't been checked)
3) Gamma is forgotten (gamma is missing or hasn't been checked)

-- 
Eero "Aero" Ahonen
   http://www.zbxt.net
      aer### [at] removethiszbxtnetinvalid


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.