X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FImage.pm;h=4a7160381d03100391486bd9150ad2fe919eb2a3;hb=29f1fc41da78a3cb8177e28d0579453c8d6ecc4e;hp=6a4f7a80e71a64f2653d1a2d5d596a04c065aa18;hpb=c53dd5ce79ebfdcf01c3847149611ebafcebdd69;p=pr0n diff --git a/perl/Sesse/pr0n/Image.pm b/perl/Sesse/pr0n/Image.pm index 6a4f7a8..4a71603 100644 --- a/perl/Sesse/pr0n/Image.pm +++ b/perl/Sesse/pr0n/Image.pm @@ -51,7 +51,12 @@ sub handler { $dbheight = $ref->{'height'}; # Scale if we need to do so - my ($fname, $mime_type) = Sesse::pr0n::Common::ensure_cached($r, $filename, $id, $dbwidth, $dbheight, $infobox, $dpr, $xres, $yres); + my ($fname, $mime_type); + if ($infobox) { + ($fname, $mime_type) = Sesse::pr0n::Common::ensure_infobox_cached($r, $filename, $id, $dbwidth, $dbheight, $dpr, $xres, $yres); + } else { + ($fname, $mime_type) = Sesse::pr0n::Common::ensure_cached($r, $filename, $id, $dbwidth, $dbheight, $xres, $yres); + } # Output the image to the user my $res = Plack::Response->new(200);