X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fmod_ppm%2Ftrgt_ppm.cpp;h=8fc48101b564e0a9a7153b678e3a910031fac7df;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=bdd53eefd581f2611e0ae7ba1db3b56718c7f5d4;hpb=5ddcf36f04cfbd10fabda4e3c5633cb27cdd4c0a;p=synfig.git diff --git a/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.cpp b/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.cpp index bdd53ee..8fc4810 100644 --- a/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.cpp +++ b/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.cpp @@ -1,9 +1,12 @@ -/*! ======================================================================== -** Synfig -** ppm Target Module -** $Id: trgt_ppm.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_ppm.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 @@ -14,6 +17,7 @@ ** 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 =========================================================== ** @@ -31,7 +35,6 @@ #endif #include "trgt_ppm.h" -#include #include #include #include @@ -50,7 +53,7 @@ SYNFIG_TARGET_INIT(ppm); SYNFIG_TARGET_SET_NAME(ppm,"ppm"); SYNFIG_TARGET_SET_EXT(ppm,"ppm"); SYNFIG_TARGET_SET_VERSION(ppm,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(ppm,"$Id: trgt_ppm.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $"); +SYNFIG_TARGET_SET_CVS_ID(ppm,"$Id$"); /* === M E T H O D S ======================================================= */ @@ -100,18 +103,15 @@ ppm::start_frame(synfig::ProgressCallback *callback) } else if(multi_image) { - String - newfilename(filename), - ext(find(filename.begin(),filename.end(),'.'),filename.end()); - newfilename.erase(find(newfilename.begin(),newfilename.end(),'.'),newfilename.end()); - - newfilename+=etl::strprintf("%04d",imagecount)+ext; - file=SmartFILE(fopen(newfilename.c_str(),"wb")); + String newfilename(filename_sans_extension(filename) + + etl::strprintf(".%04d",imagecount) + + filename_extension(filename)); + file=SmartFILE(fopen(newfilename.c_str(),POPEN_BINARY_WRITE_TYPE)); if(callback)callback->task(newfilename); } else { - file=SmartFILE(fopen(filename.c_str(),"wb")); + file=SmartFILE(fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE)); if(callback)callback->task(filename); } @@ -132,7 +132,7 @@ ppm::start_frame(synfig::ProgressCallback *callback) } Color * -ppm::start_scanline(int scanline) +ppm::start_scanline(int /*scanline*/) { return color_buffer; }