about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-11-08 20:43:38 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-11-08 20:43:38 +0000
commitf18950920cef3964c49276c0241b13cd97c42c5a (patch)
treee1d524fb6874df7922b4feda4306510ea512520a
parent6f49d21d435944e4206e37aba9c55283e4bd7b90 (diff)
downloadnetpbm-mirror-f18950920cef3964c49276c0241b13cd97c42c5a.tar.gz
netpbm-mirror-f18950920cef3964c49276c0241b13cd97c42c5a.tar.xz
netpbm-mirror-f18950920cef3964c49276c0241b13cd97c42c5a.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4781 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--editor/specialty/pnmindex.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/editor/specialty/pnmindex.c b/editor/specialty/pnmindex.c
index 4cd467b0..f5b7306c 100644
--- a/editor/specialty/pnmindex.c
+++ b/editor/specialty/pnmindex.c
@@ -2,7 +2,7 @@
                                 pnmindex
 ==============================================================================
 
-  build a visual index of a bunch of PNM images
+  Build a visual index of a bunch of PNM images.
 
   This used to be a C shell program, and then a BASH program.  Neither
   were portable enough, and the program is too complex for either of
@@ -390,7 +390,7 @@ copyScaleQuantImage(const char * const inputFileName,
     case PBM_TYPE:
         pm_asprintf(&scaleCommand,
                     "pamscale -quiet -xysize %u %u %s "
-                    "| pgmtopbm > %s",
+                    "| pamditherbw > %s",
                     size, size, inputFileNmToken, outputFileName);
         break;
 
@@ -525,11 +525,12 @@ makeThumbnail(const char *  const inputFileName,
               unsigned int  const col,
               int *         const formatP) {
 
+    const char * const fileName = thumbnailFileName(tempDir, row, col);
+
     FILE * ifP;
     int imageCols, imageRows, format;
     xelval maxval;
     const char * tmpfile;
-    const char * fileName;
 
     ifP = pm_openr(inputFileName);
     pnm_readpnminit(ifP, &imageCols, &imageRows, &maxval, &format);
@@ -543,8 +544,6 @@ makeThumbnail(const char *  const inputFileName,
         copyScaleQuantImage(inputFileName, tmpfile, format,
                             size, quant, colorCt);
 
-    fileName = thumbnailFileName(tempDir, row, col);
-
     makeImageFile(tmpfile, inputFileName, black, fileName);
 
     unlink(tmpfile);