]> git.sesse.net Git - pr0n/blobdiff - perl/Sesse/pr0n/Common.pm
New JPEG settings:
[pr0n] / perl / Sesse / pr0n / Common.pm
index 34ee8d9c7abcd2f58dced0d6001553c209e358f6..dc8813c2fc65d8506635586d54b82cea2a36af1f 100644 (file)
@@ -795,16 +795,9 @@ sub ensure_cached {
                        my $height = $img->Get('rows');
                        my ($nwidth, $nheight) = scale_aspect($width, $height, $xres, $yres);
 
                        my $height = $img->Get('rows');
                        my ($nwidth, $nheight) = scale_aspect($width, $height, $xres, $yres);
 
-                       # Use lanczos (sharper) for heavy scaling, mitchell (faster) otherwise
-                       my $filter = 'Mitchell';
-                       my $quality = 90;
-                       my $sf = undef;
-
-                       if ($width / $nwidth > 8.0 || $height / $nheight > 8.0) {
-                               $filter = 'Lanczos';
-                               $quality = 85;
-                               $sf = "1x1";
-                       }
+                       my $filter = 'Lanczos';
+                       my $quality = 87;
+                       my $sf = "1x1";
 
                        if ($xres != -1) {
                                $cimg->Resize(width=>$nwidth, height=>$nheight, filter=>$filter, 'sampling-factor'=>$sf);
 
                        if ($xres != -1) {
                                $cimg->Resize(width=>$nwidth, height=>$nheight, filter=>$filter, 'sampling-factor'=>$sf);