From 830768cf2319c9570c9e936ecc71314427fe5086 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 24 Oct 2009 11:05:19 +0200 Subject: [PATCH] New JPEG settings: - 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 | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index 34ee8d9..dc8813c 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -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); -- 2.39.2