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] Updated: (HARMONY-4776) [classlib][awt] Harmony fails while loading png images with transparency
Date Wed, 12 Sep 2007 12:29:32 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Igor V. Stolyarov updated HARMONY-4776:
---------------------------------------

    Attachment: temp.png

> [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.


Mime
View raw message