Skip to content

Commit

Permalink
Replace Image::Size with Image::Magick for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
toadchild committed Dec 22, 2018
1 parent 55565e3 commit aa58364
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use CGI qw/:standard/;
use PDF::Create;
use Data::Dumper;
use Image::Size;
use Image::Magick;

my $annotations;
read_annotations();
Expand All @@ -17,6 +17,13 @@
print_input();
}

sub imgsize {
my ($img_name) = @_;
my $img = new Image::Magick;
$img->Read($img_name);
return $img->Get("columns", "rows");
}

sub print_input{
print <<EOF;
Content-Type: text/html; charset=utf-8
Expand Down

0 comments on commit aa58364

Please sign in to comment.