]> git.proxmox.com Git - pve-docs.git/commitdiff
png-verify.pl: allow 72dpcm for pve installer images
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 22 Dec 2017 10:36:31 +0000 (11:36 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 22 Dec 2017 10:36:31 +0000 (11:36 +0100)
png-verify.pl

index 8eb661139f88e3cd9f91d42d97dab034368313fb..d345ff61ab5eaebeede2ce919a39fed499243269 100755 (executable)
@@ -2,15 +2,27 @@
 
 use strict;
 use warnings;
+use File::Basename;
+
+my $installer_images = {
+    'pve-grub-menu.png' => 1,
+    'pve-installation.png' => 1,
+    'pve-select-location.png' => 1,
+    'pve-select-target-disk.png' => 1,
+    'pve-set-password.png' => 1,
+    'pve-setup-network.png' => 1,
+};
 
 my $infile = shift ||
     die "no input file specified\n";
 
-my $dpcm = 58; # expected
+my $basename = basename($infile);
+
+my $dpcm = $installer_images->{$basename} ? 72 : 58; # expected
 
 my $tmp = `identify -units PixelsPerCentimeter -format '%x x %y' $infile`;
 
-die "got unexpected density '$tmp' (fix with png-cleanup.pl)\n"
+die "$infile: got unexpected density '$tmp' (fix with png-cleanup.pl)\n"
     if $tmp ne "$dpcm x $dpcm";
 
 exit 0;