]> git.proxmox.com Git - pve-docs.git/blob - png-cleanup.pl
allow float attribute for screenshots
[pve-docs.git] / png-cleanup.pl
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 my $infile = shift ||
7 die "no input file specified\n";
8
9 my $outfile = shift ||
10 die "no outpu file specified\n";
11
12 # use the following to verify image attributes
13 # identify -verbose <filename>
14
15 # set DPI to 146, so that we can display 1024 pixels (page width)
16
17 my $dpi = 146;
18
19 system("convert -units PixelsPerInch $infile -density $dpi $outfile");
20
21 # identify should return the same value
22 # system("identify -units PixelsPerInch -format '%x x %y' $outfile");