This queue is for tickets about the Image-Imlib2-Thumbnail CPAN distribution.

Report information
The Basics
Id:
48933
Status:
resolved
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
kane [...] cpan.org(email delivery suspended)
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Make quality configurable
For some sizes, we're wanting higher quality than the default. The below patch makes quality configurable, while defaulting to 75 like the old code did: Index: /trunk/perl/5.10/lib/site_perl/5.10.0/Image/Imlib2/Thumbnail.pm ========================================================= ========== --- /trunk/perl/5.10/lib/site_perl/5.10.0/Image/Imlib2/Thumbnail.pm (revision 1539) +++ /trunk/perl/5.10/lib/site_perl/5.10.0/Image/Imlib2/Thumbnail.pm (revision 2561) @@ -99,4 +99,8 @@ $size->{type} ); next unless $type eq $original_type; + + ### XXX add quality from the size definition if provided -- 75 + ### is not a good fit for all sizes. + my $quality = $size->{'quality'} || 75; my $scaled_image; @@ -129,5 +133,5 @@ my $destination = file( $directory, "$name$ext" )->stringify; - $scaled_image->set_quality(75); + $scaled_image->set_quality( $quality ); $scaled_image->save($destination); push @thumbnails,
Thanks, this patch is in Image-Imlib2-Thumbnail-0.40.tar.gz which just hit CPAN.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.