FILE ID: /techblog/22_Alagad-image-cfc-fake-bicubic-resize/ Sep 13, 2004

Alagad image.cfc - fake bicubic resize

I've been playing and tinkering just a bit with the Alagad Image Component. It's a nice tool, but making thumbnails with it is tricky, and the output tends to be ugly. Here's my work-around for resizing an image with this thing.

imgWidth = image.getWidth();
if (imgWidth GT 500) {
   image.blur(int(image.getWidth()/500));
   image.scalePixels(...);
}

That's it. For every 500 pixels, you blur it one pixel before you size it down to make your thumbnail. YMMV, but 500px seems to be the sweet spot for me.