Merge pull request #511 from Haojia521/master

OutputStream writes images using its Options object
This commit is contained in:
OpenSceneGraph git repository 2018-03-28 09:04:46 +01:00 committed by GitHub
commit 15e2f0ae00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -580,7 +580,7 @@ void OutputStream::writeImage( const osg::Image* img )
case IMAGE_INLINE_FILE: case IMAGE_INLINE_FILE:
if ( isBinary() ) if ( isBinary() )
{ {
std::string fullPath = osgDB::findDataFile( img->getFileName() ); std::string fullPath = osgDB::findDataFile( img->getFileName(), _options );
osgDB::ifstream infile( fullPath.c_str(), std::ios::in|std::ios::binary ); osgDB::ifstream infile( fullPath.c_str(), std::ios::in|std::ios::binary );
if ( infile ) if ( infile )
{ {