about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-01-01 18:42:37 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-01-01 18:42:37 +0000
commit95e5fdd296e33da21711ba349c589aba81fbe799 (patch)
tree73073ba75c31c5cdf930d1dd3ab7ef118b2c3240
parentb60dd2c9bd33467cb35fba57c89a673b6a4b03e2 (diff)
downloadnetpbm-mirror-95e5fdd296e33da21711ba349c589aba81fbe799.tar.gz
netpbm-mirror-95e5fdd296e33da21711ba349c589aba81fbe799.tar.xz
netpbm-mirror-95e5fdd296e33da21711ba349c589aba81fbe799.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4833 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/other/pamtogif.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/converter/other/pamtogif.c b/converter/other/pamtogif.c
index bc89607d..4b609b5c 100644
--- a/converter/other/pamtogif.c
+++ b/converter/other/pamtogif.c
@@ -1530,18 +1530,18 @@ writeGifStreamTerminator(FILE * const ofP) {
 
 
 static void
-writeGifImage(struct pam *  const pamP,
-              FILE *        const ofP,
-              pm_filepos    const rasterPos,
-              bool          const gInterlace,
-              int           const background,
-              unsigned int  const bitsPerPixel,
-              struct Cmap * const cmapP,
-              char          const comment[],
-              float         const aspect,
-              bool          const lzw,
-              bool          const noclear,
-              bool          const usingAlpha) {
+writeGif(struct pam *  const pamP,
+         FILE *        const ofP,
+         pm_filepos    const rasterPos,
+         bool          const gInterlace,
+         int           const background,
+         unsigned int  const bitsPerPixel,
+         struct Cmap * const cmapP,
+         char          const comment[],
+         float         const aspect,
+         bool          const lzw,
+         bool          const noclear,
+         bool          const usingAlpha) {
 /*----------------------------------------------------------------------------
    'usingAlpha' means use the alpha (transparency) plane, if there is one, to
    determine which GIF pixels are transparent.  When this is true, the
@@ -1588,6 +1588,8 @@ writeGifImage(struct pam *  const pamP,
     rowReader_destroy(rowReaderP);
 
     writeEndOfImage(ofP);
+
+    writeGifStreamTerminator(ofP);
 }
 
 
@@ -2054,15 +2056,13 @@ main(int argc, const char ** argv) {
 
     computeTransparent(transType, cmdline.transparent, fakeTransparent, &cmap);
 
-    writeGifImage(&pam, stdout, rasterPos,
-                  cmdline.interlace, 0, bitsPerPixel, &cmap, cmdline.comment,
-                  cmdline.aspect, !cmdline.nolzw, cmdline.noclear,
-                  transType==TRANS_ALPHA);
+    writeGif(&pam, stdout, rasterPos,
+             cmdline.interlace, 0, bitsPerPixel, &cmap, cmdline.comment,
+             cmdline.aspect, !cmdline.nolzw, cmdline.noclear,
+             transType==TRANS_ALPHA);
 
     destroyCmap(&cmap);
 
-    writeGifStreamTerminator(stdout);
-
     pm_close(ifP);
     pm_close(stdout);