From: Steinar H. Gunderson Date: Fri, 21 Mar 2008 22:59:10 +0000 (+0100) Subject: Fix a bug with scaling from non-mipmaps. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=acfea152b48748797784cd8c80bf65952d07a2c8 Fix a bug with scaling from non-mipmaps. --- diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index 9a3d31c..3b94b59 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -419,7 +419,7 @@ sub make_mipmap { push @mmlist, [ $mmwidth, $mmheight ]; } - + # Ensure that all of them are OK my $last_good_mmlocation; for my $i (0..$#mmlist) { @@ -461,6 +461,9 @@ sub make_mipmap { } } + if (!defined($img)) { + $img = read_original_image($r, $id, $dbwidth, $dbheight); + } return $img; }