Hi Robert- Yeah no worries, I just ended up mucking with the bits directly, I was just wanting to use built-in functions if they were available.
For anyone searching with a similar issue (this was in Windows btw), I ended up just setting all of the alpha elements to 0xFF within my GL_BGRA image. I was going to take it to GL_BGR, but the CF_DIB clipboard format wants a 4-byte aligned width, so instead of padding or cropping the original captured image, I just kept it in a 4-byte per-element format. If you were to keep it in BGR and you don't have it properly aligned the image will be sheared and look very wrong. Thanks-- Baker robertosfield wrote: > Hi Baker, > > On 7 November 2011 19:32, Bradley Baker Searles <> > > > How would you use gluScaleImage to convert formats? It only takes > > one format parameter, and internally it uses that one format to > > compute the size of the before and after image? It seems suited only > > to scale the image, not change formats... Am I missing something? > > > > > You are right I there is only one format parameter, I was thinking > about the GLenum typeIn, typeOut parameters which are for the data > type, so won't be suitable for your purpose. > > The include/osg/ImageUtils header contains a number help functions for > processing image data so you could probably use this. However, if you > know that you have GL_RGBA and GL_UNSIGNED_BYTE then it would be > easier to write a quick converter function that flips the 0 and 2 > bytes to give you GL_BGRA. > > Robert. > _______________________________________________ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ------------------ > Post generated by Mail2Forum ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43818#43818 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

