--- src/image_effect.cpp	2004-12-12 23:33:38.452490448 +1100
+++ easysok-0.3.4-clean/src/image_effect.cpp	2003-12-31 04:42:50.000000000 +1100
@@ -91,20 +91,20 @@
     for (int y = 0; y < height; ++y)
     {
         uchar * upper_line = upper.scanLine(y + upper_y_offset) + ((width + upper_x_offset) << 2) - 1;
-        uchar * lower_line = lower.scanLine(y + y_offset) + ((width + x_offset) << 2) - 1;
+	uchar * lower_line = lower.scanLine(y + y_offset) + ((width + x_offset) << 2) - 1;
 
         int x = width - 1;
 
         do
         {
-            while ( !(alpha = *upper_line) && (x > 0) )
+	    while ( !(alpha = *(upper_line - 3)) && (x > 0) )
             {
                 upper_line -= 4;
                 lower_line -= 4;
                 --x;
             }
 
-            *lower_line = 255 - (((255 - *upper_line) * (255 - *lower_line) + 255) >> 8);
+            *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8);
             --upper_line;
             --lower_line;
             *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8);
@@ -113,7 +113,7 @@
             *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8);
             --upper_line;
             --lower_line;
-            *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8);
+	    *lower_line = 255 - (((255 - *upper_line) * (255 - *lower_line) + 255) >> 8);
             --upper_line;
             --lower_line;
             --x;