]> git.proxmox.com Git - pve-docs.git/commitdiff
png-verify.pl: use Unit PixelsPerCentimeter
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 10 Nov 2016 15:39:35 +0000 (16:39 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 10 Nov 2016 15:39:35 +0000 (16:39 +0100)
png-cleanup.pl
png-verify.pl

index be82c59038bf340b35c2d48e81fc6d146cc20586..49c7cb45b6d92f7db94a9a55844f2954a1e0deec 100755 (executable)
@@ -12,11 +12,12 @@ my $outfile = shift ||
 # use the following to verify image attributes
 # identify -verbose <filename>
 
 # use the following to verify image attributes
 # identify -verbose <filename>
 
-# set DPI to 146, so that we can display 1024 pixels (page width)
+# set PixelsPerCentimeter to 58, so that we can display 1024 
+# pixels (page width)
 
 
-my $dpi = 146;
+my $dpcm = 58;
 
 
-system("convert -units PixelsPerInch $infile -density $dpi $outfile");
+system("convert -units PixelsPerCentimeter $infile -density $dpcm $outfile");
 
 # identify should return the same value
 
 # identify should return the same value
-# system("identify -units PixelsPerInch -format '%x x %y' $outfile");
+# system("identify -units PixelsPerCentimeter -format '%x x %y' $outfile");
index 248f9fb482ba84f3a0f10d9f683a5bb8d6f3a2fe..8eb661139f88e3cd9f91d42d97dab034368313fb 100755 (executable)
@@ -6,11 +6,11 @@ use warnings;
 my $infile = shift ||
     die "no input file specified\n";
 
 my $infile = shift ||
     die "no input file specified\n";
 
-my $dpi = 146; # expected
+my $dpcm = 58; # expected
 
 
-my $tmp = `identify -units PixelsPerInch -format '%x x %y' $infile`;
+my $tmp = `identify -units PixelsPerCentimeter -format '%x x %y' $infile`;
 
 
-die "got unexpected DPI density '$tmp' (fix with png-cleanup.pl)\n"
-    if $tmp ne "$dpi x $dpi";
+die "got unexpected density '$tmp' (fix with png-cleanup.pl)\n"
+    if $tmp ne "$dpcm x $dpcm";
 
 exit 0;
 
 exit 0;