#!perl #
#
# Perl script to convert PostScript snapshots into PCX
#
# Version: 5.20
# Date: 1998, October 30
#
# Usage:
# perl fdpcx.pl SEP
# Parameters:
# SEP... Name of the history file.
# Parameters read from the history file:
# N1=integer... Number of gridpoints (pixels) in horizotal direction.
# Default: N1=1
# N3=integer... Number of gridpoints (pixels) in vertical direction.
# Default: N3=1
# SNAPS=string... Mask for the names of PostScript snapshot files.
# Default: SNAPS='fd00*.ps'
# Include files required:
# sep.pl
# Programs required:
# gs
#
# ======================================================================
# Main program 'fdpcx.pl':
# ~~~~~~~~~~~~~~~~~~~~~~~~
require 'sep.pl';
$SEP="$ARGV[0]";
#
&RSEP1($SEP);
&RSEP3('N1',$N1,1);
&RSEP3('N3',$N3,1);
&RSEP3('SNAPS',$SNAPS,'fd00*.ps');
#
foreach $SNAP (<${SNAPS}>) {
$SNAP=~s/.ps//;
print "FDPCX: converting $SNAP\n";
open(LU,"|gs -sDEVICE=pcx24b -r72 -g${N1}x${N3} -dNOPAUSE".
" -sOutputFile=$SNAP.pcx $SNAP.ps -c quit");
close(LU) || die "Error";
}
print "FDPCX: Done.\n";
# ======================================================================
1; #