X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fmod_imagemagick%2Fmptr_imagemagick.cpp;h=bd577acdeca1185433278c869cbb2de20770a3c2;hb=eade3a78d78a6b9d5f39fe69b7fb76696e2a29ef;hp=261140ffdfc9bd89052669918332dbaa23ea09e1;hpb=28f28705612902c15cd0702cc891fba35bf2d2df;p=synfig.git diff --git a/synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.cpp b/synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.cpp index 261140f..bd577ac 100644 --- a/synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.cpp +++ b/synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.cpp @@ -1,18 +1,22 @@ -/*! ======================================================================== -** Synfig -** ppm Target Module -** $Id: mptr_imagemagick.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_imagemagick.cpp +** \brief ppm Target Module ** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** $Id$ ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** 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 =========================================================== ** @@ -49,7 +53,7 @@ SYNFIG_IMPORTER_INIT(imagemagick_mptr); SYNFIG_IMPORTER_SET_NAME(imagemagick_mptr,"imagemagick"); SYNFIG_IMPORTER_SET_EXT(imagemagick_mptr,"miff"); SYNFIG_IMPORTER_SET_VERSION(imagemagick_mptr,"0.1"); -SYNFIG_IMPORTER_SET_CVS_ID(imagemagick_mptr,"$Id: mptr_imagemagick.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $"); +SYNFIG_IMPORTER_SET_CVS_ID(imagemagick_mptr,"$Id$"); /* === M E T H O D S ======================================================= */ @@ -85,19 +89,19 @@ imagemagick_mptr::get_frame(synfig::Surface &surface,Time time, synfig::Progress return false; } string temp_file="/tmp/deleteme.png"; - + if(filename.find("psd")!=String::npos) command=strprintf("convert \"%s\" -flatten \"png32:%s\"\n",filename.c_str(),temp_file.c_str()); else command=strprintf("convert \"%s\" \"png32:%s\"\n",filename.c_str(),temp_file.c_str()); - + synfig::info("command=%s",command.c_str()); - + if(system(command.c_str())!=0) return false; Importer::Handle importer(Importer::open(temp_file)); - + DEBUGPOINT(); if(!importer) @@ -106,7 +110,7 @@ imagemagick_mptr::get_frame(synfig::Surface &surface,Time time, synfig::Progress else synfig::error(_("Unable to open ")+temp_file); return false; } - + DEBUGPOINT(); if(!importer->get_frame(surface,0,cb)) @@ -115,12 +119,12 @@ imagemagick_mptr::get_frame(synfig::Surface &surface,Time time, synfig::Progress else synfig::error(_("Unable to get frame from ")+temp_file); return false; } - + if(!surface) { if(cb)cb->error(_("Bad surface from ")+temp_file); else synfig::error(_("Bad surface from ")+temp_file); - return false; + return false; } if(1) @@ -148,12 +152,12 @@ imagemagick_mptr::get_frame(synfig::Surface &surface,Time time, synfig::Progress Surface bleh(surface); surface=bleh; - + //remove(temp_file.c_str()); DEBUGPOINT(); return true; - + #else if(file) pclose(file); @@ -243,6 +247,6 @@ imagemagick_mptr::get_frame(synfig::Surface &surface,Time time, synfig::Progress return true; #endif - - + + }