TuttleOFX  1
PngWriterPlugin.cpp
Go to the documentation of this file.
00001 #include "PngWriterPlugin.hpp"
00002 #include "PngWriterProcess.hpp"
00003 
00004 #include <boost/gil/gil_all.hpp>
00005 
00006 namespace tuttle {
00007 namespace plugin {
00008 namespace png {
00009 namespace writer {
00010 
00011 
00012 
00013 using namespace boost::gil;
00014 
00015 PngWriterPlugin::PngWriterPlugin( OfxImageEffectHandle handle )
00016         : WriterPlugin( handle )
00017 {
00018         _paramOutputComponents = fetchChoiceParam( kTuttlePluginChannel );
00019 }
00020 
00021 PngWriterProcessParams PngWriterPlugin::getProcessParams( const OfxTime time )
00022 {
00023         PngWriterProcessParams params;
00024 
00025         params._filepath   = getAbsoluteFilenameAt( time );
00026         params._components = static_cast<ETuttlePluginComponents>( this->_paramOutputComponents->getValue() );
00027         params._bitDepth   = static_cast<ETuttlePluginBitDepth>( this->_paramBitDepth->getValue() );
00028 
00029         return params;
00030 }
00031 
00032 /**
00033  * @brief The overridden render function
00034  * @param[in]   args     Rendering parameters
00035  */
00036 void PngWriterPlugin::render( const OFX::RenderArguments& args )
00037 {
00038         WriterPlugin::render( args );
00039 
00040         doGilRender<PngWriterProcess>( *this, args );
00041 }
00042 
00043 }
00044 }
00045 }
00046 }