[classlib][awt] issue in determination of BufferedImage type
------------------------------------------------------------
Key: HARMONY-1972
URL: http://issues.apache.org/jira/browse/HARMONY-1972
Project: Harmony
Issue Type: Bug
Reporter: Igor V. Stolyarov
Issue in determination of BufferedImage type when BufferedImage has IndexColorModel and colorMap
has size less than max allowed for appropriate pixel size.
Test:-------------------------------------------------------------------------------------------
import java.awt.image.*;
public class Test {
public static void main(String[] args) {
int cmap[] = new int[256];
IndexColorModel icm = new IndexColorModel(8, 10, cmap, 0, false, -1, DataBuffer.TYPE_BYTE);
WritableRaster wr = icm.createCompatibleWritableRaster(10,10);
BufferedImage bi = new BufferedImage(icm, wr, icm.isAlphaPremultiplied(), null);
if(bi.getType() == BufferedImage.TYPE_BYTE_INDEXED) System.out.println("Test passes");
else System.out.println("Test fails");
}
}
Output:-----------------------------------------------------------------------
JRockit:
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
BEA WebLogic JRockit(TM) 1.4.2_04 JVM (build ari-31788-20040616-1132-win-ia32,
Native Threads, GC strategy: parallel)
Test passes
---------------------------------------------------------------------------------
Harmony:
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r467568, (Oct 25 2006), Windows/ia32/msvc 1310, release build
http://incubator.apache.org/harmony
Test fails
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|