You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Petrenko (JIRA)" <ji...@apache.org> on 2007/09/12 12:38:32 UTC
[jira] Assigned: (HARMONY-4776) [classlib][awt] Harmony fails while
loading png images with transparency
[ https://issues.apache.org/jira/browse/HARMONY-4776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko reassigned HARMONY-4776:
----------------------------------------
Assignee: Alexey Petrenko
> [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
> 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.