diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-08-16 01:14:05 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-08-16 01:14:05 +0000 |
commit | ee202873edb0d236e03270b96504e58b4664bd8b (patch) | |
tree | 20b25b22f031cd81204a36e19795e8759a50e4b1 | |
parent | 939dd71a6334d2a2f180cb19666e7544c2753f74 (diff) | |
download | netpbm-mirror-ee202873edb0d236e03270b96504e58b4664bd8b.tar.gz netpbm-mirror-ee202873edb0d236e03270b96504e58b4664bd8b.tar.xz netpbm-mirror-ee202873edb0d236e03270b96504e58b4664bd8b.zip |
Update internal use of 'pamcat' to adapt to its new ability to produce PNM output
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4411 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rwxr-xr-x | converter/ppm/hpcdtoppm/pcdovtoppm | 16 | ||||
-rwxr-xr-x | editor/pnmmargin | 5 | ||||
-rwxr-xr-x | editor/pnmquantall | 3 | ||||
-rw-r--r-- | editor/specialty/pnmindex.c | 6 | ||||
-rwxr-xr-x | generator/ppmrainbow | 2 | ||||
-rwxr-xr-x | test/pamarith.test | 2 | ||||
-rwxr-xr-x | test/pamundice.test | 4 |
7 files changed, 18 insertions, 20 deletions
diff --git a/converter/ppm/hpcdtoppm/pcdovtoppm b/converter/ppm/hpcdtoppm/pcdovtoppm index 7d8eb5c2..1c6cb430 100755 --- a/converter/ppm/hpcdtoppm/pcdovtoppm +++ b/converter/ppm/hpcdtoppm/pcdovtoppm @@ -184,11 +184,11 @@ do if [ "$back" = "-white" ] ; then pbmtext $font "$ttext" | pnmcrop -quiet | pnmmargin -white 2 | \ - pamcat -extendplane $back -topbottom $tmpfile - > $imagefile + pamcat $back -topbottom $tmpfile - > $imagefile else pbmtext $font "$ttext" | pnmcrop -quiet | pnmmargin -white 2 | \ pnminvert | \ - pamcat -extendplane $back -topbottom $tmpfile - > $imagefile + pamcat $back -topbottom $tmpfile - > $imagefile fi rm -f $tmpfile @@ -200,9 +200,9 @@ do rowfile=${tempdir}/pi.${row} rm -f $rowfile if [ "$colors" = "n" ] ; then - pamcat -extendplane $back -leftright -jbottom $imagefiles > $rowfile + pamcat $back -leftright -jbottom $imagefiles > $rowfile else - pamcat -extendplane $back -leftright -jbottom $imagefiles | \ + pamcat $back -leftright -jbottom $imagefiles | \ ppmquant -quiet $colors > $rowfile fi rm -f $imagefiles @@ -220,9 +220,9 @@ if [ -n $imagefiles ] ; then rowfile=${tempdir}/pi.${row} rm -f $rowfile if [ "$colors" = "n" ] ; then - pamcat -extendplane $back -leftright -jbottom $imagefiles > $rowfile + pamcat $back -leftright -jbottom $imagefiles > $rowfile else - pamcat -extendplane $back -leftright -jbottom $imagefiles | \ + pamcat $back -leftright -jbottom $imagefiles | \ ppmquant -quiet $colors > $rowfile fi rm -f $imagefiles @@ -233,10 +233,10 @@ if [ $(echo $rowfiles|wc -w) -eq 1 ] ; then ppmtoppm $plainopt < $rowfiles else if [ "$colors" = "n" ] ; then - pamcat -extendplane $back -topbottom $rowfiles | \ + pamcat $back -topbottom $rowfiles | \ ppmtoppm $plainopt else - pamcat -extendplane $back -tb $rowfiles | \ + pamcat $back -tb $rowfiles | \ ppmquant $plainopt -quiet $colors fi fi diff --git a/editor/pnmmargin b/editor/pnmmargin index 01dfdecc..94321c7f 100755 --- a/editor/pnmmargin +++ b/editor/pnmmargin @@ -108,9 +108,8 @@ else pamflip -rotate90 $tmp2 > $tmp3 # Cat things together. - pamcat -extendplane -leftright $tmp2 $tmp1 $tmp2 > $tmp4 - pamcat -extendplane -topbottom $tmp3 $tmp4 $tmp3 | \ - pamtopnm $plainopt + pamcat -leftright $tmp2 $tmp1 $tmp2 > $tmp4 + pamcat -topbottom $plainopt $tmp3 $tmp4 $tmp3 fi diff --git a/editor/pnmquantall b/editor/pnmquantall index f18852a1..594e8f7b 100755 --- a/editor/pnmquantall +++ b/editor/pnmquantall @@ -145,8 +145,7 @@ sub tempFile($) { sub makeColorMap($$$$) { my ($fileNamesR, $newColorCt, $colorMapFileName, $errorR) = @_; - my $pamcatCmd = - "pamcat -extendplane -topbottom -white -jleft @{$fileNamesR}"; + my $pamcatCmd = "pamcat -topbottom -white -jleft @{$fileNamesR}"; my $pnmcolormapCmd = "pnmcolormap $newColorCt"; diff --git a/editor/specialty/pnmindex.c b/editor/specialty/pnmindex.c index 4b8dafd6..2b39e4ec 100644 --- a/editor/specialty/pnmindex.c +++ b/editor/specialty/pnmindex.c @@ -502,7 +502,7 @@ makeImageFile(const char * const thumbnailFileName, const char * inputFileNmToken = shellQuote(inputFileName); systemf("pbmtext %s %s" - "| pamcat -extendplane %s -topbottom %s - " + "| pamcat %s -topbottom %s - " "> %s", inputFileNmToken, invertStage, blackWhiteOpt, thumbnailFileName, outputFileName); @@ -616,7 +616,7 @@ combineIntoRowAndDelete(unsigned int const row, fileList = thumbnailFileList(tempDir, row, cols); - systemf("pamcat -extendplane %s -leftright -jbottom %s " + systemf("pamcat %s -leftright -jbottom %s " "%s" ">%s", blackWhiteOpt, fileList, quantStage, fileName); @@ -683,7 +683,7 @@ writeRowsAndDelete(unsigned int const rows, fileList = rowFileList(tempDir, rows); - systemf("pamcat -extendplane %s -topbottom %s | pamtopnm -assume %s", + systemf("pamcat %s -topbottom %s %s", blackWhiteOpt, fileList, quantStage); pm_strfree(fileList); diff --git a/generator/ppmrainbow b/generator/ppmrainbow index 10b1f7ae..68d519a0 100755 --- a/generator/ppmrainbow +++ b/generator/ppmrainbow @@ -127,7 +127,7 @@ while (@colorlist >= 2) { } my $termStat = - system("$verboseCommand pamcat -leftright @outlist | ppmtoppm"); + system("$verboseCommand pamcat -leftright @outlist"); if ($termStat != 0) { exit 1; } diff --git a/test/pamarith.test b/test/pamarith.test index f0149c66..34922a90 100755 --- a/test/pamarith.test +++ b/test/pamarith.test @@ -18,7 +18,7 @@ pgmmake -maxval 15 0.15 16 1 > ${input2_pgm} rgb3toppm ${input1_pgm} ${input1_pgm} ${input1_pgm} > ${input1_ppm} rgb3toppm ${input2_pgm} ${input2_pgm} ${input2_pgm} > ${input2_ppm} -pamcat -tb ${input1_pgm} ${input2_pgm} | pamtopnm -assume -plain +pamcat -tb ${input1_pgm} ${input2_pgm} -plain for fn in "-add" "-subtract" "-multiply" "-divide" "-difference" \ "-minimum" "-maximum" "-mean" "-compare" "-equal" \ diff --git a/test/pamundice.test b/test/pamundice.test index 20a84503..ba532c30 100755 --- a/test/pamundice.test +++ b/test/pamundice.test @@ -28,7 +28,7 @@ for y in 0 1 2 3 4 pamundice -across=3 ${fname_stem}"_"$y"_%1a".pgm > ${tempfile}_"$y" done -pamcat -tb ${tempfile}_[01234] | pamtopnm --assume | cksum +pamcat -tb ${tempfile}_[01234] | cksum rm ${tempfile}_[01234] # Note: the following 2 are valid. There should not be warning messages. @@ -38,7 +38,7 @@ for x in 0 1 2 pamundice -down=5 ${fname_stem}"_%1d_"$x.pgm > ${tempfile}"_"$x done -pamcat -lr ${tempfile}_[012] | pamtopnm --assume | cksum +pamcat -lr ${tempfile}_[012] | cksum rm ${tempfile}_[012] rm ${fname_stem}_?_?.pgm |