So, there are two related concepts here. First, is the gamma correction applied 
to the pixels in the FILE, and generally speaking, most things on the web are 
sRGB, which is almost the same thing as gamma 2.2. (JPEG, by spec, *must* be 
sRGB.) So OIIO should be able to figure that out, unless there is something 
weird in your file. (Verify with: "oiiotool -v -info testfile.jpg" and make 
sure the metadata says "oiio.ColorSpace" is "sRGB".)

Then, somewhat separately, there is the matter of what gamma is applied by iv 
upon display, based on the combination of what it thinks the file is, and what 
it thinks your display gamma is.

iv honors an environment variable GAMMA, which if set, it will use as the 
presumed display gamma.

I *think* that those two things should be properly handled. But I could be 
wrong.

Can you take a look at that and see (a) if you think it's working, and (b) 
whether the GAMMA env variable does everything you want, or if you still want a 
new option, in which case I'm very happy to take your patch. If so, a GitHub PR 
is a lot less work on my end. (Among other reasons, every GH PR automatically 
goes through TravisCI to verify that it doesn't break the build, against a 
number of build configurations.)

iv needs a color management overhaul. It's rather neglectful that it's not all 
ocio-based to manage color properly.


> On Sep 27, 2017, at 3:11 PM, Pete Black <[email protected]> wrote:
> 
> Hi,
> 
> I've been away from the VFX world for a while but still use OIIO and iv as my 
> image viewer.
> 
> One thing i note is that iv seems to get the gamma wrong for images I am 
> browsing off the internet (mostly JPGs) far more often than not, which means 
> I am frequently hammering the ')' key to turn up the gamma.
> 
> I modified iv and added a preference to set the default gamma to 2.2 unless 
> specified otherwise in the file.
> 
> I am not sure if this has been discussed before, and it may very well be that 
> this is not something you would take a pull request for, as the way OIIO does 
> it in intentional.
> 
> However, I attach this patch (If you would like a github pull request instead 
> i can do that I think) in case it is something people would like a toggle for.
> 
> Thanks,
> 
> -Pete
> 
> 
> <oiio_iv_patch.txt>_______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
[email protected]




_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to