[osg-users] To Convert QImage to OSG::Image

2014-12-04 Thread manish Choudhary
Hi, In my application I required to convert QImage to osg::Image to use that as a texture to wrap it on model. What is the best way to convert QImage to Osg::Image ? Thank you! Cheers, manish -- Read this topic online here:

Re: [osg-users] To Convert QImage to OSG::Image

2014-12-04 Thread Gianni Ambrosio
Hi Manish, I'm just struggling with the same problem. I found on internet (maybe in this forum) a code example and I implemented the following method: Code: osg::Image* convertImage(const QImage iImage) { osg::Image* osgImage = new osg::Image(); if (false == iImage.isNull()) {

Re: [osg-users] To Convert QImage to OSG::Image

2014-12-04 Thread Julien Valentin
Hi, Here's some old code i used.. Ther Problem is that it only work for RGBA16F image..I recommend to make usage specific code...unless you're ready to map all osg pixelformats to Qt's; Code: void ManagedImage::load(const QImageim){ for( int row=0;( int )rowim.width();row++)

Re: [osg-users] To Convert QImage to OSG::Image

2014-12-04 Thread Jason MacDonald
@lists.openscenegraph.org Subject: [osg-users] To Convert QImage to OSG::Image Hi, In my application I required to convert QImage to osg::Image to use that as a texture to wrap it on model. What is the best way to convert QImage to Osg::Image ? Thank you! Cheers, manish -- Read this topic online

Re: [osg-users] To Convert QImage to OSG::Image

2014-12-04 Thread manish Choudhary
Hi, Thanks a lot.. all of the method suggested is working in my application. Thank you! Cheers, manish -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61980#61980 ___ osg-users mailing list