[osg-users] [osgPlugins] osgPlugins ReaderWriterRGB

Ming Lu luming811120 at gmail.com
Tue Jun 14 12:38:55 PDT 2016


Hi,

I am trying to export the textures in osgb file into pic file. therefore i used ReaderWriterRGB:


> 
> osg::StateSet::TextureAttributeList osg_texture_attribute_list = osg_state->getTextureAttributeList();
> 
> unsigned int texture_list_index = 0;
> for (; texture_list_index < osg_texture_attribute_list.size(); ++texture_list_index) {
> 
>    osg::Texture2D* texture = (osg::Texture2D*)(osg_state->getTextureAttribute(texture_list_index, osg::StateAttribute::TEXTURE));
> 
> if (texture) {
> const osg::Image* image = texture->getImage();
> if (image) {
> if (!osgDB::writeImageFile(*image, image->getFileName())) {
> BOOST_LOG_TRIVIAL(error) << "Write image failed";
> }
> 


But i got this exception: 
> Warning: RGB plugin does not supporting writing compressed imagery.


my question is: how could i export the compressed texture image into a file?

Thank you!

Cheers,
Ming
> 


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67623#67623








More information about the osg-users mailing list