use LWP::Simple;
# use Image::Info;
use Image::ExifTool;
+use HTML::Entities;
BEGIN {
use Exporter ();
require Sesse::pr0n::Config_local;
};
- $VERSION = "v2.12";
+ $VERSION = "v2.21";
@ISA = qw(Exporter);
@EXPORT = qw(&error &dberror);
%EXPORT_TAGS = qw();
# 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;
return ();
}
+sub guess_charset {
+ my $text = shift;
+ my $decoded;
+
+ eval {
+ $decoded = Encode::decode("utf-8", $text, Encode::FB_CROAK);
+ };
+ if ($@) {
+ $decoded = Encode::decode("iso8859-1", $text);
+ }
+
+ return $decoded;
+}
+
1;