Win10 GTX3.x osg3.6.4
// test for read image
osg::ref_ptr texture2d = new osg::Texture2D;
osg::ref_ptr img = new osg::Image;
img=osgDB::readImageFile("C:\\Users\\Public\\Pictures\\Sample
Pictures\\Tulips.jpg");
osg::ref_ptr img2 = new osg::Image;
img2->setImage(img->s(),img->t(),img->r(),img->getInternalTextureFormat(),img->getPixelFormat(),img->getDataType(),img->data(),img->getAllocationMode());
osgDB::writeImageFile(*img2,"img2.jpg");
osgDB::writeImageFile(*img,"abc.jpg");
texture2d->setImage(img);
--
You received this message because you are subscribed to the Google Groups
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/osg-users/811b3bca-144d-4b55-8301-811f15102cbdn%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org