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.

29 lines
648B

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