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