require Sesse::pr0n::Config_local;
};
- $VERSION = "v2.60";
+ $VERSION = "v2.65";
@ISA = qw(Exporter);
@EXPORT = qw(&error &dberror);
%EXPORT_TAGS = qw();
my $large_enough = 1;
for my $i (0..($#res/2)) {
my ($xres, $yres) = ($res[$i*2], $res[$i*2+1]);
- if ($xres > $new_mmwidth || $yres > $new_mmheight) {
+ if ($xres == -1 || $xres > $new_mmwidth || $yres > $new_mmheight) {
$large_enough = 0;
last;
}
my $info = Image::ExifTool::ImageInfo($fname);
if (make_infobox($img, $info, $r)) {
$img->Quantize(colors=>16, dither=>'False');
+
+ # Since the image is grayscale, ImageMagick overrides us and writes this
+ # as grayscale anyway, but at least we get rid of the alpha channel this
+ # way.
+ $img->Set(type=>'Palette');
} else {
# Not enough room for the text, make a tiny dummy transparent infobox
@$img = ();
$height = 1;
}
- $err = $img->write(filename => $cachename, quality => 99);
+ $err = $img->write(filename => $cachename, quality => 90, depth => 8);
$r->log->info("New infobox cache: $width x $height for $id.jpg");
return ($cachename, 'image/png');