X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftags%2Fsynfig_0_61_07_rc2%2Fsrc%2Fmodules%2Fmod_openexr%2Fmptr_openexr.cpp;fp=synfig-core%2Ftags%2Fsynfig_0_61_07_rc2%2Fsrc%2Fmodules%2Fmod_openexr%2Fmptr_openexr.cpp;h=0000000000000000000000000000000000000000;hb=6fa8f2f38d4b0b35f8539bf94e27ae27015c7689;hp=d29719eac2f9d44438b780f9ac2fcbfca1edad34;hpb=47fce282611fbba1044921d22ca887f9b53ad91a;p=synfig.git diff --git a/synfig-core/tags/synfig_0_61_07_rc2/src/modules/mod_openexr/mptr_openexr.cpp b/synfig-core/tags/synfig_0_61_07_rc2/src/modules/mod_openexr/mptr_openexr.cpp deleted file mode 100644 index d29719e..0000000 --- a/synfig-core/tags/synfig_0_61_07_rc2/src/modules/mod_openexr/mptr_openexr.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_openexr.cpp -** \brief ppm Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "mptr_openexr.h" -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_IMPORTER_INIT(exr_mptr); -SYNFIG_IMPORTER_SET_NAME(exr_mptr,"openexr"); -SYNFIG_IMPORTER_SET_EXT(exr_mptr,"exr"); -SYNFIG_IMPORTER_SET_VERSION(exr_mptr,"0.1"); -SYNFIG_IMPORTER_SET_CVS_ID(exr_mptr,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -exr_mptr::exr_mptr(const char *file) -{ - filename=file; -} - -exr_mptr::~exr_mptr() -{ -} - -bool -exr_mptr::get_frame(synfig::Surface &out_surface,Time, synfig::ProgressCallback *cb) -{ - try - { - - Imf::RgbaInputFile in(filename.c_str()); - - int w = in.dataWindow().max.x - in.dataWindow().min.x + 1; - int h = in.dataWindow().max.y - in.dataWindow().min.y + 1; - //int dx = in.dataWindow().min.x; - //int dy = in.dataWindow().min.y; - -#ifdef USE_HALF_TYPE - out_surface.set_wh(w,h); - in.setFrameBuffer (reinterpret_cast(out_surface[0]), 1, w); - - in.readPixels (in.dataWindow().min.y, in.dataWindow().max.y); - -#else - etl::surface in_surface; - in_surface.set_wh(w,h); - in.setFrameBuffer (reinterpret_cast(in_surface[0]), 1, w); - - in.readPixels (in.dataWindow().min.y, in.dataWindow().max.y); - - int x; - int y; - out_surface.set_wh(w,h); - for(y=0;yerror(e.what()); - else synfig::error(e.what()); - return false; - } - - return true; -}