Hi Jim, I've been bit by this one. It seems that osgDB::writeImageFile does not correctly support images with pixelFormat = GL_RGBA for JPEG files. I think you'll find that changing to GL_RGB will get you a good file.
-Don Leich > > Trying to save an osg::Image as a .jpg file malfunctions. > Either false is returned or .jpg file has weird colors. > > But .png format works ok. > > osg::ref_ptr<osg::Image> image = mTextureObject->getImage(); > //osgDB::writeImageFile( *image, "file.jpg" ); > osgDB::writeImageFile( *image, "file.png" ); > > Tried OSG 2.8.1, 2.8.2, 2.9.6 on Linux, FreeBSD, and that thing from Redmond. > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

