JDK-6563801 : alpha values mistakenly applied twice in DrawImage.renderImageXform()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2007-05-31
  • Updated: 2018-06-26
  • Resolved: 2018-06-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8-poolResolved
Related Reports
Duplicate :  
Description
In some cases, it is possible to get incorrect blending results (alpha values
appear to be applied twice) when transforming an image with JDK 6 or higher.
This only occurs for certain destination types where a native MaskBlit loop is
not implemented (e.g. OpenGLSurface, a TYPE_FLOAT BufferedImage, and so on).

Comments
This was fixed in JDK 9 as https://bugs.openjdk.java.net/browse/JDK-8062164 http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/748091d834cf
26-06-2018

EVALUATION The problem is in DrawImage.renderImageXform(): BufferedImage tmpimg = new BufferedImage(dx2-dx1, dy2-dy1, BufferedImage.TYPE_INT_ARGB); We should create the intermediate image as TYPE_INT_ARGB_PRE, not TYPE_INT_ARGB. It should be relatively easy to come up with a regression test for this by rendering into a TYPE_CUSTOM image or an OGL-accelerated VolatileImage.
31-05-2007