[osg-users] How do I flip the texture coordinates of an Image object?
mirr...@gmail.com
mirro187 at gmail.com
Tue Jan 5 23:36:01 PST 2021
Win10 GTX3.x osg3.6.4
// test for read image
osg::ref_ptr<osg::Texture2D> texture2d = new osg::Texture2D;
osg::ref_ptr<osg::Image> img = new osg::Image;
img=osgDB::readImageFile("C:\\Users\\Public\\Pictures\\Sample
Pictures\\Tulips.jpg");
osg::ref_ptr<osg::Image> 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+unsubscribe at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20210105/18c49e8c/attachment.html>
More information about the osg-users
mailing list