From: dooglus Date: Mon, 17 Sep 2007 17:59:01 +0000 (+0000) Subject: Use compression when saving as a .sifz file. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=0de47b351b4b0f1ada3cb7a83e5e46f9ca8a5460;p=synfig.git Use compression when saving as a .sifz file. git-svn-id: http://svn.voria.com/code@694 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/savecanvas.cpp b/synfig-core/trunk/src/synfig/savecanvas.cpp index bff17b0..8988a50 100644 --- a/synfig-core/trunk/src/synfig/savecanvas.cpp +++ b/synfig-core/trunk/src/synfig/savecanvas.cpp @@ -57,6 +57,10 @@ #include "gradient.h" #include +extern "C" { +#include +} + #endif /* === U S I N G =========================================================== */ @@ -747,6 +751,11 @@ synfig::save_canvas(const String &filename, Canvas::ConstHandle canvas) synfig::String tmp_filename(filename+".TMP"); + if (String(filename.begin() + filename.find_last_of('.')+1, filename.end()) == "sifz") + xmlSetCompressMode(9); + else + xmlSetCompressMode(0); + try { assert(canvas);