This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[4.1] Patch: FYI: PR 25924
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 03 Apr 2006 13:40:48 -0600
- Subject: [4.1] Patch: FYI: PR 25924
- Reply-to: tromey at redhat dot com
I'm checking this in on the 4.1 branch. This already went into
Classpath. It can wait for the next import to be fixed on the trunk.
This fixes PR 25924.
Tom
Index: ChangeLog.gcj
from Bernhard Rosenkraenzer <bero@arklinux.org>
PR classpath/25924:
* java/awt/image/DirectColorModel.java (extractAndNormalizeSample):
Handle case where alpha==0.
Index: java/awt/image/DirectColorModel.java
===================================================================
--- java/awt/image/DirectColorModel.java (revision 112644)
+++ java/awt/image/DirectColorModel.java (working copy)
@@ -167,7 +167,7 @@
private int extractAndNormalizeSample(int pixel, int component)
{
int value = extractAndScaleSample(pixel, component);
- if (hasAlpha() && isAlphaPremultiplied())
+ if (hasAlpha() && isAlphaPremultiplied() && getAlpha(pixel) != 0)
value = value*255/getAlpha(pixel);
return value;
}