about summary refs log tree commit diff
path: root/editor
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-12-19 19:20:49 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-12-19 19:20:49 +0000
commite9c3c755752104accfb70f1ce06ac71fa64f5cf9 (patch)
tree739eb348817eaf6efc99719aba1acbd5b33fafa5 /editor
parent3fab8bec74da5e265ee304a7f4b191d3cf4734a7 (diff)
downloadnetpbm-mirror-e9c3c755752104accfb70f1ce06ac71fa64f5cf9.tar.gz
netpbm-mirror-e9c3c755752104accfb70f1ce06ac71fa64f5cf9.tar.xz
netpbm-mirror-e9c3c755752104accfb70f1ce06ac71fa64f5cf9.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4815 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r--editor/specialty/pnmindex.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/editor/specialty/pnmindex.c b/editor/specialty/pnmindex.c
index 5e71b27b..f1049f46 100644
--- a/editor/specialty/pnmindex.c
+++ b/editor/specialty/pnmindex.c
@@ -604,13 +604,30 @@ unlinkRowFiles(const char * const dirName,
 
 static void
 combineIntoRowAndDelete(unsigned int const row,
-                        unsigned int const cols,
+                        unsigned int const colCt,
                         int          const maxFormatType,
                         bool         const blackBackground,
                         bool         const quant,
                         unsigned int const colorCt,
                         const char * const tempDir) {
+/*----------------------------------------------------------------------------
+   Combine the 'colCt' thumbnails for row 'row' into a PNM file in directory
+   'tempDir'.
+
+   Each thumbnail is from a specially named file in 'tempDir' whose name
+   indicates its position in the row, and the output is also specially named
+   with a name indicating it is row 'row'.
+
+   Where the thumnails are different heights, pad with black if
+   'blackBackground' is true; white otherwise.
+
+   If 'quant', color-quantize the result to have no more than 'colorCt'
+   colors, choosing the colors that best represent all the pixels in the
+   result.
 
+   'maxFormatType' is the most expressive format of all the thumbnail files;
+   results are undefined if it is not.
+-----------------------------------------------------------------------------*/
     const char * const blackWhiteOpt = blackBackground ? "-black" : "-white";
     const char * const fileNm        = rowFileName(tempDir, row);
 
@@ -626,7 +643,7 @@ combineIntoRowAndDelete(unsigned int const row,
     else
         quantStage = strdup("");
 
-    fileList = thumbnailFileList(tempDir, row, cols);
+    fileList = thumbnailFileList(tempDir, row, colCt);
 
     pm_asprintf(&shellCommand, "pamcat %s -leftright -jbottom %s "
                 "%s",
@@ -646,7 +663,7 @@ combineIntoRowAndDelete(unsigned int const row,
     pm_strfree(fileNm);
     pm_strfree(shellCommand);
 
-    unlinkThumbnailFiles(tempDir, row, cols);
+    unlinkThumbnailFiles(tempDir, row, colCt);
 }