Imager - Re: How to sharpen pasted Images?

Posted on Tue Jan 16 13:03:30 2007 by tonyc in response to 4048 (See the whole thread of 5)
Re: How to sharpen pasted Images?

You don't give any indication of the size of the image you're scaling from.

If you're scaling a small image up to a large image you're going to lose information, Imager can't make the image detail up for you.

You might want to try setting scale()'s qtype parameter to 'mixing' which uses a different algorithm to scale the image, eg:

my $scaled_order_image = $order_image->scale( xpixels => 720, qtype => 'mixing' );

If you want to try sharpening the image you could use either the convolution of unsharp mask filter:

# filters work in-place and don't return a new image # either of the following will sharpen the image $scaled_order_image->filter(type=>'conv', coef => [ -0.5, 2, -0.5 ]); $scaled_order_image->filter(type => 'unsharpmask');

The filters are documented in perldoc Imager::Filter.

I also have a page with example of many of the filters.

Direct Responses: 4050 | 4051 | Write a response