From e9c3c755752104accfb70f1ce06ac71fa64f5cf9 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Tue, 19 Dec 2023 19:20:49 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4815 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/specialty/pnmindex.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'editor') 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); } -- cgit 1.4.1