Hi Mahendra G.R, what type does "image" have? If it is something like RGBA you try to assign a float to an unsigned byte. This will do implicit conversion.
- Werner - On Friday 24 September 2010 15:21:37 Robert Osfield wrote: > Hi Mahendra? G.R? > > All you need to do is cast the data return type to float&. > > Robert. > > On Fri, Sep 24, 2010 at 2:04 PM, Mahendra G.R <[email protected]> wrote: > > Hello Guys, > > > > I have a small situation here, i'm trying to write float data into an > > image file using image->data(x,y,z)[0] = 0.352 (an example), but it > > automatically converts it into char, how can i prevent this? > > > > Thanks, > > Best regards > > > > -- > > http://www.mahendragr.com > > > > _______________________________________________ > > 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 -- TEXION Software Solutions TEXION GmbH - Rotter Bruch 26a - D 52068 Aachen - HRB 14999 Aachen Fon: +49 241 475757-0, Fax: +49 241 475757-29, web: http://www.texion.eu Geschäftsführer/Managing Director: Werner Modenbach _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

