fix error when generating image_too_large, and show thumb on dupe upload

git-svn-id: file:///home/shish/svn/shimmie2/trunk@39 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish
2007-05-01 12:38:28 +00:00
parent 0eb5a5e6bb
commit c4cbc5991d
2 changed files with 12 additions and 8 deletions

View File

@@ -87,7 +87,9 @@ class RegenThumb extends Extension {
$memory_limit = get_memory_limit();
if($memory_use > $memory_limit) {
$thumb = imagecreatetruecolor($max_width, min($max_height, 64));
$w = $config->get_int('thumb_width');
$h = $config->get_int('thumb_height');
$thumb = imagecreatetruecolor($w, min($h, 64));
$white = imagecolorallocate($thumb, 255, 255, 255);
$black = imagecolorallocate($thumb, 0, 0, 0);
imagefill($thumb, 0, 0, $white);