Hi Ümit,yes, i need mipmapping but i want to store these mipmapped textures on disk. i dont want so many calculations on rendering... so i wanted to store these images on disk.
do you know a way to do this or i should write a code? On Thu, Aug 20, 2009 at 5:43 PM, Ümit Uzun <umituzu...@gmail.com> wrote: > Hi Ufuk; > > Compress word doesn't define your expected operation very well. This > operation's name is Mipmapping. You should generate automatic mipmapping for > your texture in runtime and the you can choose any resolution you have > created to use your program. > > Regards. > > Ümit Uzun > > > 2009/8/20 Ufuk <ufuk....@gmail.com> > >> 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 >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- Ufuk
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org