Bug 266

Summary: Loading TGA out of a jar using getResourceAsStream shows a corrupted Texture
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED INVALID    
Severity: normal    
Priority: P3    
Version: 1   
Hardware: All   
OS: windows   
URL: http://www.embege.com/misc/Test.jar
Type: DEFECT SCM Refs:
Workaround: ---
Attachments: Testcase. run the jar in a directory with jogl.jar and the natives.

Description Sven Gothel 2010-03-24 07:49:55 CET


---- Reported by emzic 2007-01-23 15:21:10 ----

hello,

when loading a tga texture from inside a jar, using getResourceAsStream, the 
texture seems to be cut off at the top. when running the same program directly, 
the texture displays correctly.

i have attached a jar, which includes the texture and the source. you should be 
able to run the jar in a directory with the jogl.jar and the native libraries.

see also:
http://www.javagaming.org/forums/index.php?topic=15731.0

you can contact me on the javagaming forum user emzic or via email: emzic at 
embege dot com



---- Additional Comments From emzic 2007-01-23 15:21:56 ----

Created an attachment
Testcase. run the jar in a directory with jogl.jar and the natives.




---- Additional Comments From kbr 2007-01-26 12:00:18 ----

I see no difference in behavior of the test case when reading the texture using
getResourceAsStream() vs. reading from a FileInputStream.

You shouldn't be ignoring the return value from InputStream.read(). You should
also be wrapping the InputStream in a BufferedInputStream. See
com.sun.opengl.util.StreamUtil.readAll().

This isn't a JOGL bug. Closing it as not a bug.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:49 EDT  ---

This bug was previously known as _bug_ 266 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=266
Imported an attachment (id=90)

The original submitter of attachment 90 [details] is unknown.
   Reassigning to the person who moved it here: sgothel@jausoft.com.