Login  Register

Re: TextureIO on Android - No suitable reader for given stream when loading standard formats

Posted by gouessej on Aug 13, 2014; 3:50pm
URL: https://forum.jogamp.org/TextureIO-on-Android-No-suitable-reader-for-given-stream-when-loading-standard-formats-tp4032781p4032782.html

Hi

It should work but you should pass "png" instead of ".png":
https://github.com/gouessej/Ardor3D/blob/master/ardor3d-jogl/src/main/java/com/ardor3d/image/util/jogl/JoglImageLoader.java#L183
https://github.com/sgothel/jogl/blob/master/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java#L1135
https://github.com/sgothel/jogl/blob/master/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java#L157

Actually, you weren't using the PNG loader of JOGL but the AWT SPI under the hood. As you passed the wrong suffix, your code was working on the desktop thanks to AWT. Take care of the vertical orientation, feel free to look at the first link I posted in order to fix that.
Julien Gouesse | Personal blog | Website