JDK-4884869 : BufferedImage.isAlphaPremultiplied() needs clarification
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2003-06-27
  • Updated: 2017-05-16
  • Resolved: 2003-08-27
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 Availabitlity Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Description
According to the spec, BufferedImage.isAlphaPremultipled() should be returning true for BufferedImage types (TYPE_INT_RGB, TYPE_INT_BGR, TYPE_3BYTE_BGR, TYPE_USHORT_565_RGB, TYPE_USHORT_555_RGB, TYPE_BYTE_GRAY, TYPE_USHORT_GRAY, TYPE_BYTE_BINARY and TYPE_BYTE_INDEXED) that do not have an alpha.  It is always returning false in these cases.  

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b15 VERIFIED IN: tiger
2004-06-14

EVALUATION There's an inconsistency between BufferedImage.isAlphaPremultiplied() and ColorModel.isAlphaPremultiplied(). As this bug states, BufferedImage specs that if a ColorModel is opaque, it should return true for premultiplied. ColorModel sets premultiplied to false if it is opaque. ###@###.### 2003-06-27 The spec for BufferedImage.getAlphaPremultiplied() needed clarification. It returns false if an image has no alpha, which is consistent with ColorModel.isAlphaPremultiplied(). CCC request http://ccc.sfbay/4884869 has been approved to update the spec. The appropriate JCK tests should be modified. ###@###.### 2003-07-29 ======================================== JCK tests have been updated and will be in b04 of the Tiger JCK. Fix verified in b16 of the Tiger JDK. ###@###.### 2003-08-27 =====================================
2003-08-27

SUGGESTED FIX *** /tmp/geta3391 Tue Jul 29 07:58:54 2003 --- BufferedImage.java Thu Jul 24 18:10:41 2003 *************** *** 1069,1076 **** /** * Returns whether or not the alpha has been premultiplied. It ! * returns <code>true</code> if there is no alpha since the ! * default alpha is OPAQUE. * @return <code>true</code> if the alpha has been premultiplied; * <code>false</code> otherwise. */ --- 1069,1075 ---- /** * Returns whether or not the alpha has been premultiplied. It ! * returns <code>false</code> if there is no alpha. * @return <code>true</code> if the alpha has been premultiplied; * <code>false</code> otherwise. */ ###@###.### 2003-07-29
2003-07-29