This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[4.1] Patch: FYI: PR 25924


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;
   }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]