From 5fb0f89a9d606568a877948630987001a7ec16d4 Mon Sep 17 00:00:00 2001 From: sam Date: Fri, 31 Jul 2009 08:24:58 +0000 Subject: [PATCH] Do not touch the alpha layer in pipi_contrast(). git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@3597 92316355-f0b4-4df1-b90c-862c8a59935f --- pipi/filter/color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } }