summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/global.pl2
-rw-r--r--lib/Multi/Image.pm6
2 files changed, 4 insertions, 4 deletions
diff --git a/data/global.pl b/data/global.pl
index 7bda8db8..45c8f6b5 100644
--- a/data/global.pl
+++ b/data/global.pl
@@ -23,6 +23,8 @@ our %S = (%S,
global_salt => 'any-private-string-here',
source_url => 'http://git.blicky.net/vndb.git/?h=master',
admin_email => 'contact@vndb.org',
+ scr_size => [ 136, 102 ], # w*h of screenshot thumbnails
+ cv_size => [ 256, 400 ], # max. w*h of cover images
user_ranks => [
# allowed actions # DB number
[qw| hist |], # 0
diff --git a/lib/Multi/Image.pm b/lib/Multi/Image.pm
index f947bf7d..0ddb1853 100644
--- a/lib/Multi/Image.pm
+++ b/lib/Multi/Image.pm
@@ -21,8 +21,6 @@ sub spawn {
|],
],
heap => {
- cvsize => [ 256, 400 ],
- scrsize => [ 136, 102 ],
cvpath => $VNDB::ROOT.'/static/cv',
sfpath => $VNDB::ROOT.'/static/sf',
stpath => $VNDB::ROOT.'/static/st',
@@ -67,7 +65,7 @@ sub cv_process { # num, res
my $im = Image::Magick->new;
$im->Read($img);
$im->Set(magick => 'JPEG');
- my($old, $new) = do_resize($im, $_[HEAP]{cvsize});
+ my($old, $new) = do_resize($im, $VNDB::S{cv_size});
$im->Set(quality => 80);
$im->Write($img);
@@ -102,7 +100,7 @@ sub scr_process { # num, res
$im->Write($sf);
# create thumbnail
- my($old, $new) = do_resize($im, $_[HEAP]{scrsize});
+ my($old, $new) = do_resize($im, $VNDB::S{scr_size});
$im->Set(quality => 90);
$im->Write($st);