Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 82425 invoked from network); 12 Sep 2007 13:22:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Sep 2007 13:22:55 -0000 Received: (qmail 82721 invoked by uid 500); 12 Sep 2007 13:22:48 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 82628 invoked by uid 500); 12 Sep 2007 13:22:48 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 82619 invoked by uid 99); 12 Sep 2007 13:22:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Sep 2007 06:22:48 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Sep 2007 13:24:30 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1E60571417D for ; Wed, 12 Sep 2007 06:22:32 -0700 (PDT) Message-ID: <11856765.1189603352094.JavaMail.jira@brutus> Date: Wed, 12 Sep 2007 06:22:32 -0700 (PDT) From: "Alexey Petrenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-4776) [classlib][awt] Harmony fails while loading png images with transparency In-Reply-To: <2040927.1189591292036.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Petrenko resolved HARMONY-4776. -------------------------------------- Resolution: Fixed The patch has been applied. Please verify. > [classlib][awt] Harmony fails while loading png images with transparency > ------------------------------------------------------------------------ > > Key: HARMONY-4776 > URL: https://issues.apache.org/jira/browse/HARMONY-4776 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Igor V. Stolyarov > Assignee: Alexey Petrenko > Attachments: H-4776.patch, temp.png > > > Simple reproducer: > import java.awt.*; > import java.awt.event.*; > public class PngDecoderTest { > public static void main(String argv[]) throws Exception { > final Image img = Toolkit.getDefaultToolkit().createImage("temp.png"); > Frame frame = new Frame("PngDecoderTest"){ > public void paint(Graphics g){ > Graphics2D g2d = (Graphics2D)g; > g2d.drawImage(img, 50, 50, this); > } > }; > > frame.addWindowListener(new WindowAdapter() { > public void windowClosing(WindowEvent ev) { > System.exit(0); > } > }); > frame.setBounds(0, 0, 400, 500); > frame.setBackground(Color.lightGray); > frame.setVisible(true); > } > } > On Harmony this test fails with following Stack Trace: > C:\test>java PngDecoderTest > java.lang.IllegalArgumentException: There is more than one component in this Col > orModel > at java.awt.image.ComponentColorModel.getAlpha(ComponentColorModel.java: > 1127) > at java.awt.image.ComponentColorModel.getRGB(ComponentColorModel.java:10 > 99) > at org.apache.harmony.awt.gl.image.OffscreenImage.setPixels(OffscreenIma > ge.java:291) > at org.apache.harmony.awt.gl.image.ImageDecoder.setPixels(ImageDecoder.j > ava:180) > at org.apache.harmony.awt.gl.image.PngDecoder.transfer(PngDecoder.java:2 > 61) > at org.apache.harmony.awt.gl.image.PngDecoder.returnData(PngDecoder.java > :244) > at org.apache.harmony.awt.gl.image.PngDecoder.decodeImage(PngDecoder.jav > a:117) > at org.apache.harmony.awt.gl.image.DecodingImageSource.load(DecodingImag > eSource.java:252) > at org.apache.harmony.awt.gl.image.ImageLoader.run(ImageLoader.java:153) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.