Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Sunday March 18, 2007
07:50 PM

Updated resizing benchmarks

[ #32734 ]

Tony Cook emailed me to inform me that Imager has a new "mixing" algorithm for scaling that is much faster than the "normal" algorithm which I used. He was right. Here are some new benchmarks that override the ones in my presentation:

For size = 800:

        s/iter Magick2      GD  Imager  Imlib2    Epeg
Magick2   3.44      --     -8%    -29%    -56%    -76%
GD        3.16      9%      --    -22%    -52%    -74%
Imager    2.46     40%     28%      --    -38%    -66%
Imlib2    1.52    127%    108%     62%      --    -46%
Epeg     0.825    317%    282%    198%     84%      --

For size = 210

        s/iter      GD  Imager  Imlib2 Magick2    Epeg
GD        2.36      --     -9%    -46%    -80%    -89%
Imager    2.14     10%      --    -40%    -78%    -87%
Imlib2    1.28     85%     68%      --    -63%    -79%
Magick2  0.469    404%    357%    172%      --    -42%
Epeg     0.271    772%    691%    372%     73%      --

So it does better, but thumbnail resizing is still nowhere near as good as Image::Magick. I suspect the trick for Image::Magick is to resize using pixel binning when the resize is less than 50%, and then follow up with a bicubic (or similar) resize. But I just don't know. I suspect the algorithm for Image::Magick ("Lanczos") is publicly documented somewhere.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.