is there any function that compress image in osg?
for example i have an 256x256 image and i want to compress it to 128x128 or
64x64...
i checked for osg::Image::scaleImage() but it did not change the
resolution.. maybe i did something wrong?
Here is the code:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void simUtil::SimImageUtils::scaleAndSaveImage( osg::Image* image, float
scaleFactor, const std::string& filename )
{
osg::ref_ptr<osg::Image> cImage = new osg::Image(*image);
cImage->scaleImage(image->s() * scaleFactor, image->t() * scaleFactor,
image->r() * scaleFactor);
osgDB::writeImageFile(*image, filename);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
--
Ufuk
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org