You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
540B

  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. my $infile = shift ||
  5. die "no input file specified\n";
  6. my $outfile = shift ||
  7. die "no outpu file specified\n";
  8. # use the following to verify image attributes
  9. # identify -verbose <filename>
  10. # set PixelsPerCentimeter to 58, so that we can display 1024
  11. # pixels (page width)
  12. my $dpcm = 58;
  13. system("convert -units PixelsPerCentimeter $infile -density $dpcm $outfile");
  14. # identify should return the same value
  15. # system("identify -units PixelsPerCentimeter -format '%x x %y' $outfile");