00001 /* === S Y N F I G ========================================================= */ 00025 /* === S T A R T =========================================================== */ 00026 00027 #ifndef __SYNFIG_MPTR_JPEG_H 00028 #define __SYNFIG_MPTR_JPEG_H 00029 00030 /* === H E A D E R S ======================================================= */ 00031 00032 #define NOMINMAX 00033 #include <synfig/importer.h> 00034 #include <synfig/string.h> 00035 #include <synfig/surface.h> 00036 _ETL_BEGIN_CDECLS 00037 #include <jpeglib.h> 00038 _ETL_END_CDECLS 00039 #include <setjmp.h> 00040 00041 /* === M A C R O S ========================================================= */ 00042 00043 /* === T Y P E D E F S ===================================================== */ 00044 00045 /* === C L A S S E S & S T R U C T S ======================================= */ 00046 00047 class jpeg_mptr : public synfig::Importer 00048 { 00049 SYNFIG_IMPORTER_MODULE_EXT 00050 private: 00051 synfig::String filename; 00052 synfig::Surface surface_buffer; 00053 00054 struct jpeg_decompress_struct cinfo; 00055 00056 static void my_error_exit (j_common_ptr cinfo); 00057 00058 public: 00059 jpeg_mptr(const char *filename); 00060 ~jpeg_mptr(); 00061 00062 virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); 00063 }; 00064 00065 /* === E N D =============================================================== */ 00066 00067 #endif