From e2c62701d8ec577f29b121f2c14ef3dbd99dea1e Mon Sep 17 00:00:00 2001 From: lehni Date: Fri, 6 Aug 2004 17:17:25 +0000 Subject: [PATCH] replaced the weird-bug-fix-line by this one, which should even be faster as no function calls are involved: String fix = "" + alpha; --- src/helma/image/Quantize.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/helma/image/Quantize.java b/src/helma/image/Quantize.java index ef41af1b..8edb4f60 100644 --- a/src/helma/image/Quantize.java +++ b/src/helma/image/Quantize.java @@ -550,7 +550,7 @@ public class Quantize { alpha = alpha < 128 ? 0 : 0xff; // this is super weird: on some systems, transparent pixels are - // not calculated correctly if the following line is taken out. + // not calculated correctly if the following block is taken out. // the bug is very strange, isn't related to the code (compiler error?) // but doesn't allways happen. as soon as it does, though, it doesn't // seem to want to go away. @@ -560,7 +560,9 @@ public class Quantize { // to fix it. // it looks as if the command forces alpha to take on correct values. // Until now I only knew of effects like that in quantum mechanics... - if (i == 0) Integer.toString(alpha); + if (i == 0) { + String fix = "" + alpha; + } if (alpha == 0 && addTransparency) { dst[i] = 0; // transparency color is at 0