New JPEG settings:
authorSteinar H. Gunderson <sesse@debian.org>
Sat, 24 Oct 2009 09:05:19 +0000 (11:05 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Sat, 24 Oct 2009 09:05:19 +0000 (11:05 +0200)
 - Use Lanczos everywhere (Mitchell really isn't that good for mipmap scaling)
 - Use 1x1 subsampling everywhere (the discoloration just isn't worth it)
 - Tone down to quality 87 to get the file sizes back down to almost-normal level.

Mainly tuned for fullscreen viewing (I haven't looked at thumbnails). About 8%
increased file size, it seems.

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);
 
-                       # 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);