From a1877d908ca67b25e687f742e6341cb1351f67e8 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 3 Aug 2022 02:22:52 +0000 Subject: Use new 'pamcat' instead of 'pnmcat' git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4388 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/specialty/pnmindex.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'editor') diff --git a/editor/specialty/pnmindex.c b/editor/specialty/pnmindex.c index ea9e12dd..5b8e9df2 100644 --- a/editor/specialty/pnmindex.c +++ b/editor/specialty/pnmindex.c @@ -387,13 +387,22 @@ makeImageFile(const char * const thumbnailFileName, const char * const inputFileName, bool const blackBackground, const char * const outputFileName) { +/*---------------------------------------------------------------------------- + Create one thumbnail image. It consists of the image in the file named + 'thumbnailFileName' with text of that name appended to the bottom. + Write the result to the file named 'outputFileName'. + + 'blackBackground' means give the image a black background where padding + is necessary and make the text white on black. If false, give the image + a white background instead. +-----------------------------------------------------------------------------*/ const char * const blackWhiteOpt = blackBackground ? "-black" : "-white"; const char * const invertStage = blackBackground ? "| pnminvert " : ""; systemf("pbmtext \"%s\" " "%s" - "| pnmcat %s -topbottom %s - " + "| pamcat -extendplane %s -topbottom %s - " "> %s", inputFileName, invertStage, blackWhiteOpt, thumbnailFileName, outputFileName); @@ -505,7 +514,7 @@ combineIntoRowAndDelete(unsigned int const row, fileList = thumbnailFileList(tempDir, row, cols); - systemf("pnmcat %s -leftright -jbottom %s " + systemf("pamcat -extendplane %s -leftright -jbottom %s " "%s" ">%s", blackWhiteOpt, fileList, quantStage, fileName); @@ -572,7 +581,7 @@ writeRowsAndDelete(unsigned int const rows, fileList = rowFileList(tempDir, rows); - systemf("pnmcat %s -topbottom %s %s", + systemf("pamcat -extendplane %s -topbottom %s | pnmtopnm -assume %s", blackWhiteOpt, fileList, quantStage); pm_strfree(fileList); -- cgit 1.4.1