about summary refs log tree commit diff
path: root/editor/ppmquantall.csh
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-03-10 20:14:15 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-03-10 20:14:15 +0000
commit9a401744c05ea3ac39c8038ee0228a58494d8c46 (patch)
treecca6a47858460d235206854bdc7e9810f62f3183 /editor/ppmquantall.csh
parent8a3fe7ecea6481aa386400a02758ea2e0aa2d450 (diff)
downloadnetpbm-mirror-9a401744c05ea3ac39c8038ee0228a58494d8c46.tar.gz
netpbm-mirror-9a401744c05ea3ac39c8038ee0228a58494d8c46.tar.xz
netpbm-mirror-9a401744c05ea3ac39c8038ee0228a58494d8c46.zip
Release 10.57.04
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@1664 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/ppmquantall.csh')
-rw-r--r--editor/ppmquantall.csh57
1 files changed, 0 insertions, 57 deletions
diff --git a/editor/ppmquantall.csh b/editor/ppmquantall.csh
deleted file mode 100644
index 9a89bca0..00000000
--- a/editor/ppmquantall.csh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/csh -f
-#
-# ppmquantall - run ppmquant on a bunch of files all at once, so they share
-#               a common colormap
-#
-# WARNING: overwrites the source files with the results!!!
-#
-# Verbose explanation: Let's say you've got a dozen pixmaps that you want
-# to display on the screen all at the same time.  Your screen can only
-# display 256 different colors, but the pixmaps have a total of a thousand
-# or so different colors.  For a single pixmap you solve this problem with
-# ppmquant; this script solves it for multiple pixmaps.  All it does is
-# concatenate them together into one big pixmap, run ppmquant on that, and
-# then split it up into little pixmaps again.
-
-if ( $#argv < 3 ) then
-    echo "usage:  ppmquantall <newcolors> <ppmfile> <ppmfile> ..."
-    exit 1
-endif
-
-set newcolors=$argv[1]
-set files=( $argv[2-] )
-
-# Extract the width and height of each of the images.
-# Here, we make the assumption that the width and height are on the
-# second line, even though the PPM format doesn't require that.
-# To be robust, we need to use Pnmfile to get that information, or 
-# Put this program in C and use ppm_readppminit().
-
-set widths=()
-set heights=()
-foreach i ( $files )
-    set widths=( $widths `sed '1d; s/ .*//; 2q' $i` )
-    set heights=( $heights `sed '1d; s/.* //; 2q' $i` )
-end
-
-set all=/tmp/pqa.all.$$
-rm -f $all
-pnmcat -topbottom -jleft -white $files | ppmquant -quiet $newcolors > $all
-if ( $status != 0 ) exit $status
-
-@ y = 0
-@ i = 1
-while ( $i <= $#files )
-    pnmcut -left 0 -top $y -width $widths[$i] -height $heights[$i] $all \
-       > $files[$i]
-    if ( $status != 0 ) exit $status
-    @ y = $y + $heights[$i]
-    @ i++
-end
-
-rm -f $all
-
-
-
-
-