"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pstoimg.pin" between
latex2html-2021.tar.gz and latex2html-2021.2.tar.gz

About: LaTeX2HTML is a utility that converts LaTeX documents to web pages in HTML.

pstoimg.pin  (latex2html-2021):pstoimg.pin  (latex2html-2021.2)
skipping to change at line 31 skipping to change at line 31
# #
############################################################################## ##############################################################################
# #
# $Log: pstoimg.pin,v $ # $Log: pstoimg.pin,v $
# Revision 2017/02/04 # Revision 2017/02/04
# -- Same transparency color for gif and png. # -- Same transparency color for gif and png.
# -- Remove RCS version number from banner. # -- Remove RCS version number from banner.
# #
# Revision 2016/04/19 # Revision 2016/04/19
# -- fix pstoimg -depth 24 -flip cw # -- fix pstoimg -depth 24 -flip cw
# avoiding dropping unexecuted command when ppmquant is not run # avoiding dropping unexecuted command when pnmquant is not run
# https://bugs.debian.org/612126 # https://bugs.debian.org/612126
# #
# Revision 1.19 2004/01/02 08:20:33 RRM # Revision 1.19 2004/01/02 08:20:33 RRM
# -- support -interlace (as identical to -interlaced) so as not to # -- support -interlace (as identical to -interlaced) so as not to
# run afoul when $POSIXLY_CORRECT is set. # run afoul when $POSIXLY_CORRECT is set.
# #
# Revision 1.18 2004/01/02 06:51:03 RRM # Revision 1.18 2004/01/02 06:51:03 RRM
# -- set the default transparent-color for PNG to 'gray85' # -- set the default transparent-color for PNG to 'gray85'
# -- allow the transparent-color to be set using an environment variable # -- allow the transparent-color to be set using an environment variable
# $ENV{'TRANSPARENT_COLOR'} # $ENV{'TRANSPARENT_COLOR'}
skipping to change at line 325 skipping to change at line 325
# Netpbm # Netpbm
my $PNMCROP = '@PNMCROP@'; my $PNMCROP = '@PNMCROP@';
my $PNMCROPOPT = ''; my $PNMCROPOPT = '';
#if @PNMBLACK@ #if @PNMBLACK@
my $PNMBLACK = '@PNMBLACK@'; my $PNMBLACK = '@PNMBLACK@';
$PNMCROPOPT = $PNMBLACK; $PNMCROPOPT = $PNMBLACK;
#fi #fi
#if @PNMCROPOPT@ #if @PNMCROPOPT@
$PNMCROPOPT = '@PNMCROPOPT@'; $PNMCROPOPT = '@PNMCROPOPT@';
#fi #fi
#if @PPMQUANT@ #if @PNMQUANT@
my $PPMQUANT = '@PPMQUANT@'; my $PNMQUANT = '@PNMQUANT@';
#fi #fi
#- #-
#if @PNMFLIP@ #if @PNMFLIP@
my $PNMFLIP = '@PNMFLIP@'; my $PNMFLIP = '@PNMFLIP@';
#fi #fi
#- #-
#if @PNMCAT@ && @PNMFILE@ && @PBMMAKE@ # can justify #if @PNMCAT@ && @PNMFILE@ && @PBMMAKE@ # can justify
my $PNMCAT = '@PNMCAT@'; my $PNMCAT = '@PNMCAT@';
my $PNMFILE = '@PNMFILE@'; my $PNMFILE = '@PNMFILE@';
my $PBMMAKE = '@PBMMAKE@'; my $PBMMAKE = '@PBMMAKE@';
skipping to change at line 874 skipping to change at line 874
die <<"EOF" if($RIGHT_JUSTIFY && $CENTER); die <<"EOF" if($RIGHT_JUSTIFY && $CENTER);
$prompt: Error: Conflicting options -center and -rightjustify. $prompt: Error: Conflicting options -center and -rightjustify.
EOF EOF
# now setup some parameters # now setup some parameters
# calculate dpi resolution from density and scale # calculate dpi resolution from density and scale
$DENSITY = int($opt{scale} * $DENSITY + .5) if($opt{scale} != 1); $DENSITY = int($opt{scale} * $DENSITY + .5) if($opt{scale} != 1);
#if @PPMQUANT@ #if @PNMQUANT@
my $reduce_color = ''; my $reduce_color = '';
if($opt{depth} == 1) { if($opt{depth} == 1) {
$reduce_color = "$PPMQUANT 2"; $reduce_color = "$PNMQUANT 2";
} }
elsif ($opt{depth} == 8) { elsif ($opt{depth} == 8) {
$reduce_color = "$PPMQUANT 256"; $reduce_color = "$PNMQUANT 256";
} }
#fi #fi
my $gs_aalias = ''; my $gs_aalias = '';
#if @GSALIASDEVICE@ #if @GSALIASDEVICE@
if($opt{antialias}) { if($opt{antialias}) {
$GSDEVICE = $GSALIASDEVICE; $GSDEVICE = $GSALIASDEVICE;
if($opt{depth} == 1) { if($opt{depth} == 1) {
$gs_aalias = '-dTextAlphaBits=4 '; $gs_aalias = '-dTextAlphaBits=4 ';
#if @PPMQUANT@ #if @PNMQUANT@
$reduce_color = "$PPMQUANT -floyd 256"; $reduce_color = "$PNMQUANT -norandom -floyd 256";
#fi #fi
} }
else { else {
$gs_aalias = '-dTextAlphaBits=4 -dGraphicsAlphaBits=4 '; $gs_aalias = '-dTextAlphaBits=4 -dGraphicsAlphaBits=4 ';
} }
} }
elsif ($opt{aaliastext}) { elsif ($opt{aaliastext}) {
$GSDEVICE = $GSALIASDEVICE; $GSDEVICE = $GSALIASDEVICE;
$gs_aalias = '-dTextAlphaBits=4 '; $gs_aalias = '-dTextAlphaBits=4 ';
#if @PPMQUANT@ #if @PNMQUANT@
$reduce_color = "$PPMQUANT -floyd 256"; $reduce_color = "$PNMQUANT -norandom -floyd 256";
#fi #fi
} }
#fi #fi
#- #-
my $PAPERSIZE = $ENV{PAPERSIZE} || ''; my $PAPERSIZE = $ENV{PAPERSIZE} || '';
# This rx matches float values in Bounding Box expressions # This rx matches float values in Bounding Box expressions
my $Brx = '-?\d+(?:\.\d*|)'; my $Brx = '-?\d+(?:\.\d*|)';
############################################################################## ##############################################################################
# Main program # Main program
skipping to change at line 1531 skipping to change at line 1531
if($TRANSPARENT) { if($TRANSPARENT) {
$pnmtoimg .= ' -trans ' . L2hos->quote('='.$trans_color); $pnmtoimg .= ' -trans ' . L2hos->quote('='.$trans_color);
} }
} }
#fi - png #fi - png
unless($pnmtoimg) { unless($pnmtoimg) {
print qq($prompt: Error: unknown image type "$opt{type}".\n); print qq($prompt: Error: unknown image type "$opt{type}".\n);
exit 2; exit 2;
} }
#if @PPMQUANT@ #if @PNMQUANT@
#if @PNMFILE@ #if @PNMFILE@
unless($type) { unless($type) {
($type,$width,$height) = &get_image_geometry($in); ($type,$width,$height) = &get_image_geometry($in);
return 0 unless($type); return 0 unless($type);
} }
#fi #fi
# run ppmquant only on color/gray images # run pnmquant only on color/gray images
if($reduce_color && (!$type || $type =~ /(ppm|pgm)/i)) { if($reduce_color && (!$type || $type =~ /(ppm|pgm)/i)) {
#if @pipes@ #if @pipes@
if($cmd) { if($cmd) {
$cmd .= "| $reduce_color " $cmd .= "| $reduce_color "
} else { } else {
$cmd = "$reduce_color < $in "; $cmd = "$reduce_color < $in ";
} }
#else #else
&do_cmd($in,$tmp,"$reduce_color < $in") || return 0; &do_cmd($in,$tmp,"$reduce_color < $in") || return 0;
#fi #fi
} }
#fi # PPMQUANT #fi # PNMQUANT
#if @pipes@ #if @pipes@
if($cmd) { if($cmd) {
$cmd .= "| $pnmtoimg " $cmd .= "| $pnmtoimg "
} else { } else {
$cmd = "$pnmtoimg < $in "; $cmd = "$pnmtoimg < $in ";
} }
&do_cmd_norename($cmd,$out) || return 0; &do_cmd_norename($cmd,$out) || return 0;
#else #else
&do_cmd_norename("$pnmtoimg < $in",$out) || return 0; &do_cmd_norename("$pnmtoimg < $in",$out) || return 0;
 End of changes. 10 change blocks. 
13 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)