Change the order of the modules - magick++ is the last resort, other than the custom...
[synfig.git] / synfig-core / trunk / src / modules / mod_bmp / trgt_bmp.cpp
index e0203a9..94834c7 100644 (file)
@@ -2,7 +2,7 @@
 /*!    \file trgt_bmp.cpp
 **     \brief Bitmap Target
 **
-**     $Id: trgt_bmp.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
+**     $Id$
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
@@ -51,7 +51,7 @@ SYNFIG_TARGET_INIT(bmp);
 SYNFIG_TARGET_SET_NAME(bmp,"bmp");
 SYNFIG_TARGET_SET_EXT(bmp,"bmp");
 SYNFIG_TARGET_SET_VERSION(bmp,"0.1");
-SYNFIG_TARGET_SET_CVS_ID(bmp,"$Id: trgt_bmp.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_TARGET_SET_CVS_ID(bmp,"$Id$");
 
 /* === C L A S S E S & S T R U C T S ======================================= */
 
@@ -175,18 +175,15 @@ bmp::start_frame(synfig::ProgressCallback *callback)
        rowspan=4*((w*(channels(pf)*8)+31)/32);
        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=fopen(newfilename.c_str(),"wb");
+               String newfilename(filename_sans_extension(filename) +
+                                                  etl::strprintf(".%04d",imagecount) +
+                                                  filename_extension(filename));
+               file=fopen(newfilename.c_str(),POPEN_BINARY_WRITE_TYPE);
                if(callback)callback->task(newfilename+_(" (animated)"));
        }
        else
        {
-               file=fopen(filename.c_str(),"wb");
+               file=fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE);
                if(callback)callback->task(filename);
        }
 
@@ -245,7 +242,7 @@ bmp::start_frame(synfig::ProgressCallback *callback)
 }
 
 Color *
-bmp::start_scanline(int scanline)
+bmp::start_scanline(int /*scanline*/)
 {
        return color_buffer;
 }