From da134aa8edb1c1be14c68c61107021e0d905df50 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 21 Jun 2013 13:41:03 +0000 Subject: [PATCH] From Stephan Huber, "attached you'll find the missing readObject-implementations for the imageio-plugin as suggested by Remo Eichenberger." --- src/osgPlugins/imageio/ReaderWriterImageIO.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/imageio/ReaderWriterImageIO.cpp b/src/osgPlugins/imageio/ReaderWriterImageIO.cpp index 2093323a4..395adcfdb 100644 --- a/src/osgPlugins/imageio/ReaderWriterImageIO.cpp +++ b/src/osgPlugins/imageio/ReaderWriterImageIO.cpp @@ -254,7 +254,7 @@ osg::Image* CreateOSGImageFromCGImage(CGImageRef image_ref) { /* This code is adapted from Apple's Documentation found here: * http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/index.html - * Listing 9-4††Using a Quartz image as a texture source. + * Listing 9-4Using a Quartz image as a texture source. * Unfortunately, this guide doesn't show what to do about * non-RGBA image formats so I'm making the rest up * (and it's probably all wrong). @@ -1295,6 +1295,16 @@ public: #endif } + virtual ReadResult readObject(std::istream& fin,const osgDB::ReaderWriter::Options* options =NULL) const + { + return readImage(fin, options); + } + + virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options =NULL) const + { + return readImage(file, options); + } + }; // now register with Registry to instantiate the above