HI Vincent, What do you mean by an "error append"?
In your code have both a allocateImage and a setImage, you should just use one or other. Robert. On Thu, Apr 10, 2008 at 5:46 PM, Vincent Bourdier < [EMAIL PROTECTED]> wrote: > Hi All, > > I'm making a loop which compute each pixel color for a RVB image... > > but sometimes, wen runing, an error append in : > > osg::ref_ptr<osg::Image> image = new osg::Image; > > image->allocateImage(_x, _y, 1, GL_RGB, GL_UNSIGNED_BYTE); > > image->setOrigin(osg::Image::BOTTOM_LEFT);//start counting pixels on > > the Bottom left of the picture > > image->setImage(_x, _y, 1, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, data, > > osg::Image::USE_NEW_DELETE); > > > > osgDB::writeImageFile(*image, "Z:/autres/Gradient.jpg"); > > > > note : data is a unsigned char* of _x*_y*3 size > > Is there any specification or order to create a osg::Image from an > unsigned char* ? > > Thanks. > > Regards, > Vincent. > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

