diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-24 18:43:32 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-24 18:43:32 (GMT) |
commit | b32153bc5f54424b14330855fed0701aec750fae (patch) | |
tree | f6deb4d465054f38b47a41905f4e379123ebb2bd /src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp | |
parent | 3680f2d86991144f14dc7b40671ffff0c0f68cb2 (diff) | |
download | uscxml-b32153bc5f54424b14330855fed0701aec750fae.zip uscxml-b32153bc5f54424b14330855fed0701aec750fae.tar.gz uscxml-b32153bc5f54424b14330855fed0701aec750fae.tar.bz2 |
Improved mimetype handling
Diffstat (limited to 'src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp')
-rw-r--r-- | src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp b/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp index 3fbcc36..7be93f3 100644 --- a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp +++ b/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.cpp @@ -33,6 +33,7 @@ #include <osg/ShapeDrawable> #include <boost/lexical_cast.hpp> +#include <boost/algorithm/string.hpp> #ifdef BUILD_AS_PLUGINS #include <Pluma/Connector.hpp> @@ -239,7 +240,7 @@ void OSGConverter::process(const SendRequest& req) { std::ofstream outFile(dest.c_str()); outFile << ss.str(); } - Data content(ss.str().c_str(), ss.str().size(), false); + Data content(ss.str().c_str(), ss.str().size(), URL::getMimeType(format), false); reportSuccess(req, content); return; } @@ -619,7 +620,7 @@ void OSGConverter::NameRespectingWriteToFile::operator()(const osg::Image& image #endif Data content; - content.compound[format] = Data(buffer, length, false); + content.compound[format] = Data(buffer, length, URL::getMimeType(format), false); // save image as a raw rgba as well for ffmpeg - we are using the mpb format for now // osg::ref_ptr<osgDB::ReaderWriter> writerRGBA = osgDB::Registry::instance()->getReaderWriterForExtension("rgba"); |