00001 /* === S Y N F I G ========================================================= */ 00025 /* === S T A R T =========================================================== */ 00026 00027 #ifndef __SYNFIG_TRGT_OPENEXR_H 00028 #define __SYNFIG_TRGT_OPENEXR_H 00029 00030 /* === H E A D E R S ======================================================= */ 00031 00032 #include <synfig/target_scanline.h> 00033 #include <synfig/string.h> 00034 #include <synfig/surface.h> 00035 #include <cstdio> 00036 #include <OpenEXR/ImfArray.h> 00037 #include <OpenEXR/ImfRgbaFile.h> 00038 #include <exception> 00039 00040 /* === M A C R O S ========================================================= */ 00041 00042 /* === T Y P E D E F S ===================================================== */ 00043 00044 /* === C L A S S E S & S T R U C T S ======================================= */ 00045 00046 class exr_trgt : public synfig::Target_Scanline 00047 { 00048 public: 00049 private: 00050 bool multi_image; 00051 int imagecount,scanline; 00052 synfig::String filename; 00053 Imf::RgbaOutputFile *exr_file; 00054 Imf::Rgba *buffer; 00055 etl::surface<Imf::Rgba> out_surface; 00056 #ifndef USE_HALF_TYPE 00057 synfig::Color *buffer_color; 00058 #endif 00059 00060 bool ready(); 00061 public: 00062 exr_trgt(const char *filename); 00063 virtual ~exr_trgt(); 00064 00065 virtual bool set_rend_desc(synfig::RendDesc *desc); 00066 virtual bool start_frame(synfig::ProgressCallback *cb); 00067 virtual void end_frame(); 00068 00069 virtual synfig::Color * start_scanline(int scanline); 00070 virtual bool end_scanline(void); 00071 00072 00073 SYNFIG_TARGET_MODULE_EXT 00074 }; 00075 00076 /* === E N D =============================================================== */ 00077 00078 #endif