Hi Blake,

There isn't a convenience method built into osg::Image to do this, but
you could easily use gluScaleImage to convert the data.  The new
inbuilt glu lib within the OSG-3.x has the ability to work without a
graphics context, this is enabled by passing in a PixelStorageModes
structure in the gluScaleImage call.  See the implementation of
osg::Image::scaleImage(..) for an example of how this is done.

Robert.

On Tue, Nov 1, 2011 at 12:40 AM, Blake Mason <[email protected]> wrote:
> I have a osg::image with pixel format of GL_BGRA. I need to convert it to
> GL_RGB so that I can write out any generic type of image with osgDB (i.e.,
> jpg, png, tiff, etc). Is there an easy way to  convert the _data in the
> image to be in some other format? I could obviously do this myself with a
> simple loop, but I wanted to see if there was a simple OSG way.
>
> writeImageFile is still commented out in the osgscreencapture.cpp example,
> and I wonder if it's a similar problem.
> _______________________________________________
> 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

Reply via email to