Hi Ulrich,the reason of the problem is not image or cimage. yes you are right they are different but i think i wrote it wrong here. anyway when i debug i saw that cImage resoultion did not change.
but today i checked the code again and i saw that i wrote the code like: cImage->scaleImage(image->s() * scaleFactor, image->t() * scaleFactor, image->r() * scaleFactor); scaling of first 2 is ok but not the third one. image->r() should not be changed. so i corrected like that: cImage->scaleImage(image->s() * scaleFactor, image->t() * scaleFactor, image->r() ); now it works... :) On Fri, Aug 21, 2009 at 12:26 PM, Ulrich Hertlein <u.hertl...@sandbox.de>wrote: > Hi Ufuk, > > disregarding the follow-ups regarding mipmapping: > > you're saving the original image. The scaled down image is 'cimage', not > the original 'image'. Change the 'writeImageFile' to use 'cimage' and you > should be good. > > Cheers, > /uli > > On 20/08/09 4:39 PM, Ufuk wrote: > >> is there any function that >> com///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> 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); >> } >> > _______________________________________________ > 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