<div>Win10  GTX3.x  osg3.6.4</div><div>// test for read image</div><div>osg::ref_ptr<osg::Texture2D> texture2d = new osg::Texture2D;</div><div>osg::ref_ptr<osg::Image> img = new osg::Image;</div><div>img=osgDB::readImageFile("C:\\Users\\Public\\Pictures\\Sample Pictures\\Tulips.jpg");</div><div>osg::ref_ptr<osg::Image> img2 = new osg::Image;</div><div>img2->setImage(img->s(),img->t(),img->r(),img->getInternalTextureFormat(),img->getPixelFormat(),img->getDataType(),img->data(),img->getAllocationMode());</div><div>osgDB::writeImageFile(*img2,"img2.jpg");</div><div>osgDB::writeImageFile(*img,"abc.jpg");</div><div>texture2d->setImage(img);</div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/811b3bca-144d-4b55-8301-811f15102cbdn%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/811b3bca-144d-4b55-8301-811f15102cbdn%40googlegroups.com</a>.<br />