<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>724</bug_id>
          
          <creation_ts>2013-04-24 14:56:45 +0200</creation_ts>
          <short_desc>Loading transparent PNG without alpha channel into Texture</short_desc>
          <delta_ts>2013-07-03 11:50:01 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>util</component>
          <version>2</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alan Sambol">alan.zgb</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>alan.zgb</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>35fcf49d1cb49e3844e7cee44f34d827d8a102ce
51427b92a2d9cd3fc619854e26536c9c6adad947
f0c8d6cf5d7f8f64cea79b3d0d27e4db6ccef41e</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2513</commentid>
    <comment_count>0</comment_count>
      <attachid>456</attachid>
    <who name="Alan Sambol">alan.zgb</who>
    <bug_when>2013-04-24 14:56:45 +0200</bug_when>
    <thetext>Created attachment 456
Original PNG. Contains transparent background. Created in Adobe Photoshop.

Loading the texture via following command doesn&apos;t work properly:
TextureIO.newTexture(getClass().getClassLoader().getResource(&quot;original.png&quot;), false, &quot;png&quot;);

Result can be seen here: http://forum.jogamp.org/file/n4029016/bar-left-rendered.png (don&apos;t mind the blue line and rotation, it&apos;s from another png).
It turns out yellow instead of gray.

If I use the following command it works fine:
BufferedImage img = ImageIO.read(getClass().getClassLoader().getResource(&quot;original.png&quot;));
TextureIO.newTexture(AWTTextureIO.newTextureData(GLProfile.getDefault(), img, false));

The problem is I can&apos;t use AWTTextureIO on Android, which is one of our target platforms.

The original image is in attachment. It&apos;s a default png image created in Adobe Photoshop - with transparent background and no alpha channel - used for web and Jogl1 with no problems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2749</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-07-03 11:50:01 +0200</bug_when>
    <thetext>1 Add manual unit test, incr. PNGImage verbosity.

2 PNGJ: Bump to git sha1 a0b1101ba2d37de39428ed55c8189502e24a3125 
  of https://code.google.com/p/pngj/

3 Testing PNG Transparency / Fixing GLSL Shader of test case: 
   Mix texture alpha properly (pre-multiply), due to lack of ALPHA_BLENDING.

&apos;Works for me&apos; .. i.e. w/ fixed GLSL shader respecting texture alpha,
the GL readBuffer produced the right data.

I don&apos;t think [2] has anything todo w/ it - but I don&apos;t like to test again.

Thank you for the test case (image), it is incl. in our unit tests now [1 and 3].
You might want to tune your shader code, or enable ALPHA blending ?!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>456</attachid>
            <date>2013-04-24 14:56:45 +0200</date>
            <delta_ts>2013-04-24 14:56:45 +0200</delta_ts>
            <desc>Original PNG. Contains transparent background. Created in Adobe Photoshop.</desc>
            <filename>original.png</filename>
            <type>image/png</type>
            <size>2129</size>
            <attacher name="Alan Sambol">alan.zgb</attacher>
            
              <data encoding="base64">iVBORw0KGgoAAAANSUhEUgAAAH8AAABaCAYAAACR3ImWAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAJcEhZcwAADsMAAA7DAcd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