I actually did check the png writing code and it supports BGRA as of OSG 3.0, however I have to support OSG 2.8 also, which does not have that pixel format yet. I did try acquiring the image from the GPU using GL_RGB but could not get it to work, so I stuck with how osgscreencapture did it.

-Blake

On 2011-10-31 23:58, J.P. Delport wrote:
Hi,

is the image coming from the GPU? If so, you can let OpenGL convert it
for you on the way to CPU if you don't mind too much about transfer
speed. Also, double check the image writing code if a certain format
does not support BGRA.

jp

On 01/11/2011 02:40, Blake Mason 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