Browse Source

+ new option : images/maxmem

master
Alex 'AdUser' Z 9 years ago
parent
commit
e7ab3df007
  1. 1
      conf/ldv.conf.sample
  2. 2
      lib/LDV/Imgbin.pm

1
conf/ldv.conf.sample

@ -30,6 +30,7 @@
root => 'data/imgbin',
expire => 'year',
maxres => '8192x8192',
maxmem => 96 * 1024 * 1024,
maxsize => 32 * 1024 * 1024,
thumbs_ext => 'jpg',
thumbs_size => '250x250',

2
lib/LDV/Imgbin.pm

@ -84,7 +84,7 @@ sub save {
my ($im_w, $im_h) = ($conf->{maxres} =~ m/(\d+)x(\d+)/oi);
Imager->set_file_limits(
width => $im_w, height => $im_h,
bytes => $conf->{maxsize},
bytes => $conf->{maxmem},
);
my $image = Imager->new(file => $upload->asset->path)

Loading…
Cancel
Save