DreamT has asked for the wisdom of the Perl Monks concerning the following question:

Hi! I've done a function that takes a big jpeg picture and scales it into 3 different sizes. The largest one of the scaled images looks really good, but the two other looks really bad (the smaller, the badder)

I realize that this has to do do with the scaling algorithm, but can I tweak it in some way? Or is Imager limited to the underlying libraries on the server? I've tried to scale the images with qtype=mixed, but the result wasn't much better than before.

And yes, I've set the jpegquality to "100" :-)

Replies are listed 'Best First'.
Re: Imager quality issues
by SuicideJunkie (Vicar) on Mar 31, 2010 at 13:46 UTC

    What exactly is "bad" about them? I think this calls for sample data.

    There is only so much you can do with a handful of pixels, but it will probably help if you scale it by a power of 2 so that the new pixels line up exactly with the old ones.

    PS: You aren't using JPG for the intermediate steps I hope! Keep the originals and temp files in a non-lossy format and only convert to JPG while you are uploading/burning them to the final destination.

Re: Imager quality issues
by fishnuts (Acolyte) on Apr 01, 2010 at 03:34 UTC
    If the library has a parameter for type of scaling interpolation, such as with "nearest neighbor", "bicubic", or "bilinear", make sure you DO NOT use "nearest neighbor", which is usually the default, because of its speed/memory efficiency. Being the simplest algorithm used for resizing images, nearest-neighbor leaves the most (read: jaggies and pixelation) artifacts.
Re: Imager quality issues
by BrowserUk (Patriarch) on Apr 02, 2010 at 00:54 UTC

    Did you get a solution?