Skip to content

Commit

Permalink
iv: Assume iv display gamma 2.2 (#4118)
Browse files Browse the repository at this point in the history
A better default for users is probably to assume a 2.2 value if the
GAMMA env variable is not set. If you want something different, set
GAMMA proactively or use a real color managed workflow.

Fixes #318

Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz authored Jan 27, 2024
1 parent 0edeccd commit 4d06e2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/iv/imageviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ ImageViewer::ImageViewer(bool use_ocio, const std::string& image_color_space,
{
readSettings(false);

float gam = Strutil::stof(Sysutil::getenv("GAMMA"));
float gam = Strutil::stof(Sysutil::getenv("GAMMA", "2.2"));
if (gam >= 0.1 && gam <= 5)
m_default_gamma = gam;
// FIXME -- would be nice to have a more nuanced approach to display
Expand Down

0 comments on commit 4d06e2d

Please sign in to comment.