OpenImageIO/oiio — pull request #506 by lgritz (2013-02-03 06:51:49+00:00)
Title: maketx bug in fix_latl_edges -- apparent cut/paste error summed incorrectly

maketx bug in fix_latl_edges -- apparent cut/paste error summed incorrectly

This is the special routine that patches up the poles, only comes into play for OpenEXR environment maps. The top and/or bottom rows are supposed to be averaged, which happens by summing, then dividing by the number of pixels summed. Somehow, one extra pixel got added, I can only imagine that it was a cut-and-paste error. But the result is that OpenEXR environment maps had just a teensy bit too much energy at the poles. But this compounds at each MIP level, so for extremely blurry environment lookups, it could look much brighter than it should have.

It was clearly wrong before, right now. But beware -- if you re-convert an environment map, this could change its appearance. (Only if it's an OpenEXR env map, it did not affect ordinary texture, nor TIFF environment maps.)

Apologies -- this seems to have been a bug that's been in effect for a long, long time.