Bug 266 - Loading TGA out of a jar using getResourceAsStream shows a corrupted Texture
Summary: Loading TGA out of a jar using getResourceAsStream shows a corrupted Texture
Status: VERIFIED INVALID
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All windows
: P3 normal
Assignee: Sven Gothel
URL: http://www.embege.com/misc/Test.jar
Depends on:
Blocks:
 
Reported: 2007-01-23 03:21 CET by Sven Gothel
Modified: 2010-03-24 07:49 CET (History)
0 users

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments
Testcase. run the jar in a directory with jogl.jar and the natives. (15.05 KB, application/octet-stream)
2007-01-23 15:21 CET, Sven Gothel
Details

Note You need to log in before you can comment on or make changes to this bug.
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.