X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FCommon.pm;h=1f1eac878537ebaffcfdb4e0c54187d0bfdf1841;hp=d0bafe648af346c7def363b87ce0f92ae2c0dfb9;hb=aebd301b01c9b4e75e382fb7c1fcb9347c48ffd0;hpb=7039a36da013481c21f65bd5a808b61ea9e5656a diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index d0bafe6..1f1eac8 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -23,6 +23,7 @@ use MIME::Types; use LWP::Simple; # use Image::Info; use Image::ExifTool; +use HTML::Entities; BEGIN { use Exporter (); @@ -33,7 +34,7 @@ BEGIN { require Sesse::pr0n::Config_local; }; - $VERSION = "v2.20"; + $VERSION = "v2.21"; @ISA = qw(Exporter); @EXPORT = qw(&error &dberror); %EXPORT_TAGS = qw(); @@ -362,7 +363,12 @@ sub ensure_cached { # Strip EXIF tags etc. $cimg->Strip(); - $err = $cimg->write(filename=>$cachename, quality=>$quality); + if (($nwidth >= 640 && $nheight >= 480) || + ($nwidth >= 480 && $nheight >= 640)) { + $err = $cimg->write(filename=>$cachename, quality=>$quality, interlace=>'Plane'); + } else { + $err = $cimg->write(filename=>$cachename, quality=>$quality); + } undef $cimg;