about summary refs log tree commit diff
path: root/editor/ppmquant
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-08-19 03:12:28 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-08-19 03:12:28 +0000
commit1fd361a1ea06e44286c213ca1f814f49306fdc43 (patch)
tree64c8c96cf54d8718847339a403e5e67b922e8c3f /editor/ppmquant
downloadnetpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.gz
netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.xz
netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.zip
Create Subversion repository
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/ppmquant')
-rwxr-xr-xeditor/ppmquant30
1 files changed, 30 insertions, 0 deletions
diff --git a/editor/ppmquant b/editor/ppmquant
new file mode 100755
index 00000000..11bce6d2
--- /dev/null
+++ b/editor/ppmquant
@@ -0,0 +1,30 @@
+#!/usr/bin/perl -w
+##############################################################################
+#  This is nothing but a compatibility interface for Pnmquant.
+#  An old program coded to call Ppmquant will continue working because
+#  this interface exists.  All new (or newly modified) programs should
+#  call Pnmquant or Pnmremap instead.
+#
+#  In days past, Pnmquant and Pnmremap did not exist.  Ppmquant did
+#  the job of both Pnmremap and Pnmquant, but only on PPM images.
+##############################################################################
+
+use strict;
+
+use Getopt::Long;
+
+my $TRUE=1; my $FALSE = 0;
+
+my @ppmquantArgv = @ARGV;
+
+Getopt::Long::Configure('pass_through');
+
+my $validOptions = GetOptions('mapfile' => \my $mapfileopt);
+
+my $mapfileOptionPresent = ($validOptions && $mapfileopt);
+
+if ($mapfileOptionPresent) {
+    system('pnmremap', @ppmquantArgv);
+} else {
+    system('pnmquant', @ppmquantArgv);
+}