aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2013-11-14 17:12:55 +0100
committerBert Münnich <ber.t@posteo.de>2013-11-14 17:12:55 +0100
commitac2a6ff04044704c8334b8e6adab6db0a4f9f80a (patch)
tree4e7dddd25f17b395d6888da5bf178f0a1d290e09
parent50f9ad14de921295d7a1687799e30562808e940a (diff)
Correct out-of-range gamma values given on command line
-rw-r--r--image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/image.c b/image.c
index cadbe45..ee49076 100644
--- a/image.c
+++ b/image.c
@@ -85,7 +85,7 @@ void img_init(img_t *img, win_t *win)
img->multi.animate = false;
img->cmod = imlib_create_color_modifier();
- img->gamma = options->gamma;
+ img->gamma = MIN(MAX(options->gamma, -GAMMA_RANGE), GAMMA_RANGE);
}
void exif_auto_orientate(const fileinfo_t *file)