From 0d97aab94faefc3b85d248ed47be086c240760dc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 26 Apr 2011 11:51:21 +0000 Subject: [PATCH] From Farshid Lashkari, "I believe their is small error in how OutputStream handles the WriteImageHint. In the "writeImage" method, it converts the WriteImageHint to an internal "decision" flag. During this conversion, it seems to be swapping the behavior for WRITE_EXTERNAL_FILE and WRITE_USE_EXTERNAL. I've attached what I believe to be the correct conversion." --- src/osgDB/OutputStream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osgDB/OutputStream.cpp b/src/osgDB/OutputStream.cpp index 85cd38a4d..539f46749 100644 --- a/src/osgDB/OutputStream.cpp +++ b/src/osgDB/OutputStream.cpp @@ -324,8 +324,8 @@ void OutputStream::writeImage( const osg::Image* img ) { case OutputStream::WRITE_INLINE_DATA: decision = IMAGE_INLINE_DATA; break; case OutputStream::WRITE_INLINE_FILE: decision = IMAGE_INLINE_FILE; break; - case OutputStream::WRITE_EXTERNAL_FILE: decision = IMAGE_EXTERNAL; break; - case OutputStream::WRITE_USE_EXTERNAL: decision = IMAGE_WRITE_OUT; break; + case OutputStream::WRITE_EXTERNAL_FILE: decision = IMAGE_WRITE_OUT; break; + case OutputStream::WRITE_USE_EXTERNAL: decision = IMAGE_EXTERNAL; break; default: if ( img->getWriteHint()==osg::Image::EXTERNAL_FILE ) decision = IMAGE_EXTERNAL;