Hello,
I'm trying to generate a single texture file from a few .png images that
may be provided by the user. I can't seem to find success on how to do
that with the Image routines. I have loaded in a 256x64 image and then
doubled its width via img->setWidth(...) in hopes of appending another
256x64 image beside the original and saving the end result to file
(which is later referenced by a 3ds file). I'm trying to use:
osg::ImagePtr res = osg::Image::create();
beginEditCP(res);
res->read("ads/ads.png");
res->setWidth(img1->getWidth() + img2->getWidth()); //this will
set width of texture based on images
res->setSubData(256, 1, 1, img1->getWidth(), img1->getHeight(),
img1->getDepth(), img1->getData());
res->setSubData(img1->getWidth(), img1->getHeight(),
img1->getDepth(), img2->getWidth(), img2->getHeight(),
img2->getDepth(), img2->getData());
endEditCP(res);
res->write("models_p/test.png");
this doesn't do anything though. Please help me, I'm stumped.
Thanks,
Roger.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users