]> git.sesse.net Git - pr0n/blobdiff - perl/Sesse/pr0n/Common.pm
Bump version to v2.65.
[pr0n] / perl / Sesse / pr0n / Common.pm
index c441d679326494f5cfdfd27e4f52e84e8c206130..4dca96a60d426e2e34185f28878aa80a297d39db 100644 (file)
@@ -35,7 +35,7 @@ BEGIN {
                require Sesse::pr0n::Config_local;
        };
 
-       $VERSION     = "v2.60";
+       $VERSION     = "v2.65";
        @ISA         = qw(Exporter);
        @EXPORT      = qw(&error &dberror);
        %EXPORT_TAGS = qw();
@@ -576,6 +576,11 @@ sub ensure_cached {
                        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 = ();