]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/perl | |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | use File::Basename; | |
6 | ||
7 | my $installer_images = { | |
8 | 'pve-grub-menu.png' => 1, | |
9 | 'pve-installation.png' => 1, | |
10 | 'pve-select-location.png' => 1, | |
11 | 'pve-select-target-disk.png' => 1, | |
12 | 'pve-set-password.png' => 1, | |
13 | 'pve-setup-network.png' => 1, | |
14 | }; | |
15 | ||
16 | my $infile = shift || | |
17 | die "no input file specified\n"; | |
18 | ||
19 | my $basename = basename($infile); | |
20 | ||
21 | my $dpcm = $installer_images->{$basename} ? 72 : 58; # expected | |
22 | ||
23 | my $tmp = `identify -units PixelsPerCentimeter -format '%x x %y' $infile`; | |
24 | ||
25 | die "$infile: got unexpected density '$tmp' (fix with png-cleanup.pl)\n" | |
26 | if $tmp ne "$dpcm x $dpcm"; | |
27 | ||
28 | exit 0; |