Image Resizing

Matts on 2007-03-17T03:36:16

I did a talk last night at KW.pm about image resizing. Basically comparing a bunch of image modules (GD, Imager, Imlib2, Magick and Epeg) for both performance and (slightly) more importantly quality of output.

Of course it took about 4 or 5 hours to create the presentation, picking up on all the minute image details to figure out which were better/worse. And it only took 30 minutes to present it. Bah! Still I think it went down well, and we got to the pub sooner.

I have a QT version of the presentation (converted from Keynote) here. I also have a PDF version for people who aren't QT enough (geddit?), which I'll send a link to you if you email me, simply because the PDF is 50M and the QT is 5M for some bizarre reason.

The presentation doesn't cover any of the verbals, which are really key, pointing out some of the artifacting and bad resizing issues with some of the images, but hopefully if you're interested you can probably fill in those blanks yourself.

My personal conclusion at the end was that given that epeg's resizing was so awful, and Image::Magick (with the v2 resizing) was almost as fast, but the best quality - it was simply a no-brainer to just use Image::Magick (despite being absolutely horrible to install compared to e.g. Imager).

I note in the presentation that I couldn't get Imager's sharpening algorithms to work whatsoever, so I used a convolve filter (which is another sharpening technique). If anyone knows how to get those working I'd be happy to do a re-test, though it still ends up being slower than Image::Magick so from a performance standpoint it still loses.

Anyway, enjoy the presentation. If you have any questions, post to this blog or email me (either way I get an email).


Great Talk

barbie on 2007-03-17T12:47:02

If you don't mind I think I might borrow the idea for a companion talk to my Graphing With Perl talk :)

Re:Great Talk

Matts on 2007-03-17T15:43:30

Sure. I'll upload the code too.

mirrored

da on 2007-03-17T12:52:14

To share the b/w lurve, I've mirrored it at: http://kw.pm.org/talks/2007-03-Image_resize.mov

Again, thanks!

Imager unsharpmask

ask on 2007-03-28T00:20:22

Yeah, I thought it was just me!

Over on YellowBot I am using Imager to resize uploaded photos and they generally look awful. :-) I'll try your convolve trick (trying hard to avoid getting into the claws of Image::Magick and its awful API again...)

  - ask