Hi Yefei, I don't really follow what the problem is. Is it a problem in the Jpeg plugin? What do you mean by black and white mode? Do you mean its the plugin is generating an luminance or intensity image?
Robert. On 8/18/07, Yefei He <[EMAIL PROTECTED]> wrote: > Hi, folks, > > I have noticed this phenomenon regarding textures. I wonder if anybody > have an > idea on how it can be solved: > > I'm creating a rectangular geometry with an osg::Texture2D as its > texture, and > The image of the texture is assigned via setImage(osg::Image* image), which > is in > turn created from a call to osgDB:ReadImageFile(). The image is a jpg file. > It > appears that if the jpg file is in B&W mode, then even if I call setImage() > again > to assign a different image loaded from a color jpg file, the result remains > in > black and white. Is there a state I have to explicitly set to turn the > texture into > color mode? The B&W jpg file is a solid black image and the file size is > 9KB. An > identical image in color mode has a file size of 12KB. If I load the 12KB > jpg file > as the initial image of the texture, then subsequent color images are all > rendered > correctly in color. > > Thanks, > > Yefei > > > > _______________________________________________ > 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

