Permalink
Browse files

Fix #271: Imager jpeg thumbnail quality low.

  • Loading branch information...
1 parent 6352f43 commit deb0cf46307fd2eb04db264d2276dae1a64c5e5a Zdravko Balorda committed Jun 27, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/Bric/Biz/Asset/Business/Media.pm
  2. +1 −1 lib/Bric/Biz/Asset/Business/Media/Image.pm
@@ -1562,7 +1562,7 @@ sub upload_file {
my $path = Bric::Util::Trans::FS->cat_dir($dir, $name);
if (ref $fh eq 'Imager') {
- $fh->write( file => $path ) or throw_gen(
+ $fh->write( file => $path, jpegquality => 100 ) or throw_gen(
error => "Imager cannot write '$path'",
payload => $fh->errstr
);
@@ -728,7 +728,7 @@ sub create_thumbnail {
# Save the image or die.
my $thumbfile = $self->_thumb_file;
- $img->write(file => $thumbfile) or throw_gen(
+ $img->write(file => $thumbfile, jpegquality => 100) or throw_gen(
error => "Imager cannot write '$thumbfile'",
payload => $img->errstr
);

1 comment on commit deb0cf4

@zdravko
Owner

Output image quality is set to 100%. Other filters (gif, png...) will just ignore this parameter, jpeg will understand it.

Please sign in to comment.