pmg-docs/png-verify.pl
Thomas Lamprecht 8bc67ce3c9 verify-images: include the file name that failed verification
so that it might actually be useful..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-28 14:15:04 +01:00

17 lines
331 B
Perl
Executable File

#!/usr/bin/perl
use strict;
use warnings;
my $infile = shift ||
die "no input file specified\n";
my $dpcm = 58; # expected
my $tmp = `identify -units PixelsPerCentimeter -format '%x x %y' $infile`;
die "got unexpected density '$tmp' for file '$infile' (fix with png-cleanup.pl)\n"
if $tmp ne "$dpcm x $dpcm";
exit 0;