United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4884869 : BufferedImage.isAlphaPremultiplied() needs clarification

Details
Type:
Bug
Submit Date:
2003-06-27
Status:
Closed
Updated Date:
2003-08-27
Project Name:
JDK
Resolved Date:
2003-08-27
Component:
client-libs
OS:
solaris_8
Sub-Component:
2d
CPU:
sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
5.0 (tiger)

Related Reports

Sub Tasks

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



Hardware and Software, Engineered to Work Together