about summary refs log tree commit diff
path: root/editor
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-08-03 01:54:03 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-08-03 01:54:03 +0000
commitea33c0f4199428c3c06572eb6d13dae41340b9d7 (patch)
tree8b8fff938c79f53d8915170ce540a372a6e2c321 /editor
parent46247b94c06d6e07e5a09b50d43f45c7411dc89f (diff)
downloadnetpbm-mirror-ea33c0f4199428c3c06572eb6d13dae41340b9d7.tar.gz
netpbm-mirror-ea33c0f4199428c3c06572eb6d13dae41340b9d7.tar.xz
netpbm-mirror-ea33c0f4199428c3c06572eb6d13dae41340b9d7.zip
Use new 'pamcat' instead of 'pnmcat'
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4385 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rwxr-xr-xeditor/pnmindex.sh32
-rwxr-xr-xeditor/pnmmargin5
-rwxr-xr-xeditor/pnmquantall5
3 files changed, 27 insertions, 15 deletions
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);