(none) imager-devel
/ help / lists / applications / search /
 

Re: Poor "scale" results

From: Tony Cook (
18202@xyz.molar.is)
Date: Sat 23 Feb 2008 - 22:33:33 GMT

  • Next message: Tony Cook: "Re: Poor "scale" results"

    On Fri, Feb 22, 2008 at 03:31:17PM -0800, Ask Bj?rn Hansen wrote:
    > My code for doing this below -- anything obvious I'm doing wrong?
    >
    >
    > - ask
    >
    >
    > my $img = $img_original->scale(scalefactor => $scale);
    >
    > if ($size->{crop}) {
    > $img = $img->crop(width => $size->{dim}->[0],
    > height => $size->{dim}->[1],
    > );
    > }
    >
    > $img->filter(type => "unsharpmask", stddev => 1.25, scale => 1)
    > or die $img->errstr;
    >
    > my $data;
    > $img->write(data => \$data,
    > type => 'jpeg',
    > jpegquality => 82,
    > )
    > or die $img->errstr;

    For better detail when scaling down, please try setting qtype to
    'mixing'.

              my $img = $img_original->scale(scalefactor => $scale, qtype => 'mixing');

    without doing any post processing (no unsharp mask).

    Tony



  •