X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=png-cleanup.pl;fp=png-cleanup.pl;h=be82c59038bf340b35c2d48e81fc6d146cc20586;hp=0000000000000000000000000000000000000000;hb=f250356fdf56d6f43aa44c4abfe869c48b622ae5;hpb=7515acaff54dc07ebf8dee70417c6a0d9f724747 diff --git a/png-cleanup.pl b/png-cleanup.pl new file mode 100755 index 0000000..be82c59 --- /dev/null +++ b/png-cleanup.pl @@ -0,0 +1,22 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +my $infile = shift || + die "no input file specified\n"; + +my $outfile = shift || + die "no outpu file specified\n"; + +# use the following to verify image attributes +# identify -verbose + +# set DPI to 146, so that we can display 1024 pixels (page width) + +my $dpi = 146; + +system("convert -units PixelsPerInch $infile -density $dpi $outfile"); + +# identify should return the same value +# system("identify -units PixelsPerInch -format '%x x %y' $outfile");