harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor V. Stolyarov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-1972) [classlib][awt] issue in determination of BufferedImage type
Date Thu, 26 Oct 2006 08:58:17 GMT
[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.

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");
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
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

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


View raw message