Code

opacity max value is 255 instead of previous wrong 256 maxvalue that was used here
authorJucaBlues <JucaBlues@users.sourceforge.net>
Tue, 12 Feb 2008 14:12:17 +0000 (14:12 +0000)
committerJucaBlues <JucaBlues@users.sourceforge.net>
Tue, 12 Feb 2008 14:12:17 +0000 (14:12 +0000)
src/display/nr-filter-flood.cpp

index 951e5e460af6edb8266eb248395a1c341a9e70d5..34ab8eaa0a201414f2f9741a8ca7e99ceca50be3 100644 (file)
@@ -47,7 +47,7 @@ int FilterFlood::render(FilterSlot &slot, FilterUnits const &/*units*/) {
     r = (unsigned char) (color >> 24) % 256;
     g = (unsigned char) (color >> 16) % 256;
     b = (unsigned char) (color >>  8) % 256;
-    a = CLAMP_D_TO_U8(opacity*256);
+    a = CLAMP_D_TO_U8(opacity*255);
 
     for(i=0; i < 4*in_h*in_w; i+=4){
             out_data[i]=r;