[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/graphics/digikamimageplugins/hotpixels
From: Unai Garro <ugarro () telefonica ! net>
Date: 2006-07-19 21:00:13
Message-ID: 1153342813.018855.22114.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 564315 by uga:
Avoid exceeding color value limits (especially negative values, which cause fully saturated colors)
M +6 -1 hotpixelfixer.cpp
--- trunk/extragear/graphics/digikamimageplugins/hotpixels/hotpixelfixer.cpp #564314:564315
@@ -278,7 +278,12 @@
if (fabs (v) <= DBL_MIN)
component=0;
else if (sum_weight >= DBL_MIN)
- component=(int) (v/sum_weight);
+ {
+ component=(int) (v/sum_weight);
+ //Clamp value
+ if (component<0) component=0;
+ if (component>maxComponent) component=maxComponent;
+ }
else if (v >= 0.0)
component=maxComponent;
else
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic