diff --git a/pipi/filter/color.c b/pipi/filter/color.c index bbc191b..b241ff4 100644 --- a/pipi/filter/color.c +++ b/pipi/filter/color.c @@ -155,7 +155,7 @@ pipi_image_t *pipi_contrast(pipi_image_t *src, double val) dstdata[d + 1] = p < 0. ? 0. : p > 1. ? 1. : p; p = (srcdata[d + 2] - 0.5) * val + 0.5; dstdata[d + 2] = p < 0. ? 0. : p > 1. ? 1. : p; - p = (srcdata[d + 3] - 0.5) * val + 0.5; + p = srcdata[d + 3]; dstdata[d + 3] = p; } }