It can be two things... A) You need the jpg plugin (which is not by default) B) You've written wrong the address to the file
2012/4/30 James Lue <[email protected]> > Hi, > I want to load an image as my texture image in Android. > I just tried to load a jpg image from sdcard by OSG, but it always fails. > Here is my code: > > osg::ref_ptr<osg::Image> > img=osgDB::readImageFile("/mnt/sdcard/data/img.jpg"); > if(!img) > __android_log_write(ANDROID_LOG_ERROR,"Load Image","Not Loaded"); > > it always shows the error log. I tried .png files and it still doesn't > work. > > Any idea? > > Thank you! > > Cheers, > James > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=47439#47439 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

