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