Re: [osg-users] Reading a Tiff out of memory?

2011-03-28 Thread Robert Osfield
Hi Barry,

A number of the OSG plugins support reading from istream, and the tiff
plugin is one of them, a quick grep of the source code suggests that
the quicktime and imageio plugins also look like do to.

So... just use a istream to map the memory and then pass this to the
plugin you want to read the stream from.

Robert.

On Sun, Mar 27, 2011 at 12:08 AM, Barry evan...@telusplanet.net wrote:
 Hopefully a quick question
 Under OS X it's easy to get existing images as tiff's
     NSImage *theImage = [NSImage imageNamed:@NSExitFullScreenTemplate];
     NSData *tiffForm = [theImage TIFFRepresentation];
 Where NSExitFullScreenTemplate is a standard system image that the OS
 manages for us.
 I've been exploring the osg::Image methods and there doesn't seem to be an
 easy way to set up an osg::Image using tiff data already residing in memory.
 Files easy, but I don't see the call for using something already in Ram..
 Or am I missing something?
 Thanks for any advice.
 Barry Evans


 Reality is that which, when you stop believing in it, doesn't go away.
 --Philip K. Dick

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Reading a Tiff out of memory?

2011-03-26 Thread Barry
Hopefully a quick question

Under OS X it's easy to get existing images as tiff's

NSImage *theImage = [NSImage imageNamed:@NSExitFullScreenTemplate];
NSData *tiffForm = [theImage TIFFRepresentation];

Where NSExitFullScreenTemplate is a standard system image that the OS manages 
for us.

I've been exploring the osg::Image methods and there doesn't seem to be an easy 
way to set up an osg::Image using tiff data already residing in memory.
Files easy, but I don't see the call for using something already in Ram..

Or am I missing something?

Thanks for any advice.

Barry Evans



Reality is that which, when you stop believing in it, doesn't go away.
--Philip K. Dick

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org