Bug 660

Summary: Indexed color PNG does not render correctly
Product: [JogAmp] Jogl Reporter: Parker Abercrombie <parker>
Component: coreAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: normal CC: parker, sgothel
Priority: ---    
Version: 2   
Hardware: All   
OS: macosx   
Type: --- SCM Refs:
6d85470b2cb58670fd326b66ccbb396e24139014 3ee6665fb5cdcf50599e7ec51c67f6d56a73887b bfe40bf3670731ef44ff4066c2a7119f1ab43bf8 d9d0abc0974f42dbc1c7c91bc004b92729b8ae8a
Workaround: ---
Attachments: Test case. Reads and displays an indexed PNG.

Description Parker Abercrombie 2013-01-05 02:13:14 CET
Created attachment 405 [details]
Test case. Reads and displays an indexed PNG.

Some indexed color PNG images do not render correctly when loaded using the PNGTextureProvider. It appears that the alpha channel is rendered instead of the indexed color channel.

To reproduce
------------

Run the attached test program:

java -Xmx512m -Dsun.java2d.noddraw=true -Dnewt.debug=all -Dnativewindow.debug=all -Djogl.debug=all -classpath ".:jogl-all.jar:gluegen-rt.jar" TestIndexedPNG

This program reads the file indexed.png and displays the image in a window.

Actual results
--------------

Image is rendered in grayscale, as if the alpha channel is being drawn instead of the actual image.

Expected results
----------------

Image should be rendered in color, as it appears in other viewers.
Comment 1 Sven Gothel 2013-03-20 04:50:27 CET
Done .. tested w/ our own unit tests, see SCM refs.