From ea33c0f4199428c3c06572eb6d13dae41340b9d7 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 3 Aug 2022 01:54:03 +0000 Subject: Use new 'pamcat' instead of 'pnmcat' git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4385 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pnmindex.sh | 32 +++++++++++++++++++++----------- editor/pnmmargin | 5 +++-- editor/pnmquantall | 5 +++-- 3 files changed, 27 insertions(+), 15 deletions(-) (limited to 'editor') diff --git a/editor/pnmindex.sh b/editor/pnmindex.sh index dfc5b82a..ef468fc3 100755 --- a/editor/pnmindex.sh +++ b/editor/pnmindex.sh @@ -155,9 +155,12 @@ for i in "$@"; do imagefile=$tempdir/pi.${row}.${col} rm -f $imagefile if [ "$back" = "-white" ]; then - pbmtext "$i" | pnmcat $back -tb $tmpfile - > $imagefile + pbmtext "$i" | \ + pamcat -extendplane $back -topbottom $tmpfile - > $imagefile else - pbmtext "$i" | pnminvert | pnmcat $back -tb $tmpfile - > $imagefile + pbmtext "$i" | \ + pnminvert | \ + pamcat -extendplane $back -topbottom $tmpfile - > $imagefile fi imagefiles=( ${imagefiles[*]} $imagefile ) @@ -166,10 +169,12 @@ for i in "$@"; do rm -f $rowfile if [ $maxformat != PPM -o "$doquant" = "false" ]; then - pnmcat $back -lr -jbottom ${imagefiles[*]} > $rowfile + pamcat -extendplane $back -leftright -jbottom ${imagefiles[*]} \ + > $rowfile else - pnmcat $back -lr -jbottom ${imagefiles[*]} | \ - pnmquant -quiet $colors > $rowfile + pamcat -extendplane $back -leftright -jbottom ${imagefiles[*]} | \ + pnmquant -quiet $colors \ + > $rowfile fi rm -f ${imagefiles[*]} @@ -190,22 +195,27 @@ if [ ${#imagefiles[*]} -gt 0 ]; then rowfile=$tempdir/pi.${row} rm -f $rowfile if [ $maxformat != PPM -o "$doquant" = "false" ]; then - pnmcat $back -lr -jbottom ${imagefiles[*]} > $rowfile + pamcat -extendplane $back -leftright -jbottom ${imagefiles[*]} \ + > $rowfile else - pnmcat $back -lr -jbottom ${imagefiles[*]} | \ - pnmquant -quiet $colors > $rowfile + pamcat -extendplane $back -leftright -jbottom ${imagefiles[*]} | \ + pnmquant -quiet $colors > \ + $rowfile fi rm -f ${imagefiles[*]} rowfiles=( ${rowfiles[*]} $rowfile ) fi if [ ${#rowfiles[*]} -eq 1 ]; then - cat $rowfiles + pnmtopnm $rowfiles else if [ $maxformat != PPM -o "$doquant" = "false" ]; then - pnmcat $back -tb ${rowfiles[*]} + pamcat -extendplane $back -topbottom ${rowfiles[*]} |\ + pnmtopnm else - pnmcat $back -tb ${rowfiles[*]} | pnmquant -quiet $colors + pamcat -extendplane $back -topbottom ${rowfiles[*]} | \ + pnmquant -quiet $colors | \ + pnmtopnm fi fi rm -f ${rowfiles[*]} diff --git a/editor/pnmmargin b/editor/pnmmargin index e8851bda..6b30c074 100755 --- a/editor/pnmmargin +++ b/editor/pnmmargin @@ -101,8 +101,9 @@ else pamflip -rotate90 $tmp2 > $tmp3 # Cat things together. - pnmcat -lr $tmp2 $tmp1 $tmp2 > $tmp4 - pnmcat -tb $plainopt $tmp3 $tmp4 $tmp3 + pamcat -extendplane -leftright $tmp2 $tmp1 $tmp2 > $tmp4 + pamcat -extendplane -topbottom $tmp3 $tmp4 $tmp3 | \ + pnmtopnm $plainopt fi diff --git a/editor/pnmquantall b/editor/pnmquantall index 5f434fc2..b818ef07 100755 --- a/editor/pnmquantall +++ b/editor/pnmquantall @@ -145,11 +145,12 @@ sub tempFile($) { sub makeColorMap($$$$) { my ($fileNamesR, $newColorCt, $colorMapFileName, $errorR) = @_; - my $pnmcatCmd = "pnmcat -topbottom -white -jleft @{$fileNamesR}"; + my $pamcatCmd = \ + "pamcat -extendplane -topbottom -white -jleft @{$fileNamesR}"; my $pnmcolormapCmd = "pnmcolormap $newColorCt"; - my $makeMapCmd = "$pnmcatCmd | $pnmcolormapCmd >$colorMapFileName"; + my $makeMapCmd = "$pamcatCmd | $pnmcolormapCmd >$colorMapFileName"; my $termStatus = system($makeMapCmd); -- cgit 1.4.1