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=e2a545ab0b5e0bd04b244dfc522534fecc7ed8ba;hpb=70bcefce2ab011a11014f36fc129b473cc0bc61e;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 e2a545a..8fc4810 100644 --- a/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.cpp +++ b/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.cpp @@ -2,8 +2,11 @@ /*! \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 @@ -32,7 +35,6 @@ #endif #include "trgt_ppm.h" -#include #include #include #include @@ -51,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 ======================================================= */ @@ -101,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); } @@ -133,7 +132,7 @@ ppm::start_frame(synfig::ProgressCallback *callback) } Color * -ppm::start_scanline(int scanline) +ppm::start_scanline(int /*scanline*/) { return color_buffer; }