X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fmod_gif%2Ftrgt_gif.cpp;h=20689955c714b954fddbe2ed01d3e5ca0d9d8bbb;hb=334e15ce6c4d9b1f30a168a55e7ef4d31320d568;hp=41ed47128d4fbdeb442224f5147f1899c8344868;hpb=5ddcf36f04cfbd10fabda4e3c5633cb27cdd4c0a;p=synfig.git diff --git a/synfig-core/trunk/src/modules/mod_gif/trgt_gif.cpp b/synfig-core/trunk/src/modules/mod_gif/trgt_gif.cpp index 41ed471..2068995 100644 --- a/synfig-core/trunk/src/modules/mod_gif/trgt_gif.cpp +++ b/synfig-core/trunk/src/modules/mod_gif/trgt_gif.cpp @@ -1,9 +1,12 @@ -/*! ======================================================================== -** Synfig -** BMP Target Module -** $Id: trgt_gif.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_gif.cpp +** \brief BMP 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 =========================================================== ** @@ -49,13 +53,13 @@ SYNFIG_TARGET_INIT(gif); SYNFIG_TARGET_SET_NAME(gif,"gif"); SYNFIG_TARGET_SET_EXT(gif,"gif"); SYNFIG_TARGET_SET_VERSION(gif,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(gif,"$Id: trgt_gif.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $"); +SYNFIG_TARGET_SET_CVS_ID(gif,"$Id$"); /* === M E T H O D S ======================================================= */ gif::gif(const char *filename_): filename(filename_), - file( (filename=="-")?stdout:fopen(filename_,"wb") ), + file( (filename=="-")?stdout:fopen(filename_,POPEN_BINARY_WRITE_TYPE) ), imagecount(0), lossy(true), @@ -129,21 +133,17 @@ gif::init() else fputc((0xF0+(rootsize-1))&~(1<<7),file.get()); // flags - fputc(0,file.get()); // backgound color + fputc(0,file.get()); // background color fputc(0,file.get()); // Pixel Aspect Ratio - DEBUGPOINT(); - if(!local_palette) { - DEBUGPOINT(); curr_palette=Palette::grayscale(256/(1<<(8-rootsize))-1); output_curr_palette(); } if(loop_count && multi_image) { - DEBUGPOINT(); fputc(33,file.get()); // 33 (hex 0x21) GIF Extension code fputc(255,file.get()); // 255 (hex 0xFF) Application Extension Label fputc(11,file.get()); // 11 (hex (0x0B) Length of Application Block @@ -154,7 +154,6 @@ gif::init() fputc((loop_count&0x0000ff00)>>8,file.get()); fputc(0,file.get()); // 0 (hex 0x00) a Data Sub-block Terminator. } - DEBUGPOINT(); return true; }