0

Just wondering: I'm trying to set up an adaptive image handler in Coldfusion8, which resizes images for smaller screensizes.

I have it working allright and am currently playing around with the different resize options found here

What I notice is no matter what method I'm using, they all take time, reduce the image quality and not really reduce the image size, so for example:

                         IMG 1                     IMG 2
Original             23K 900x360px             53K 900x360px
Blackman             22k 320x128px             52K 320x128px
highPerformance      21K 320x128px             32K 320x128px 
nearest              25K    "                  38K    "         

The idea was to resize images for smaller displays. Right now I'm not really reducing anything, I'm only drainging the processor for resizing and output blurry images and the same file size.

Question:
Why should I bother resizing then? I might as well send the original file which @900x360px @23K. At least that images will be sharp vs. a resized blurry image with 320x1280px. Is there a way to make resizing images in Coldfusion worthwhile in terms of file size and/or image quality?

Thanks for inputs!Cldfu

Evik James
  • 10,335
  • 18
  • 71
  • 122
frequent
  • 27,643
  • 59
  • 181
  • 333
  • 1
    The images are already quite small... you're gonna come up against the law of diminishing returns as images get smaller: there's only so much squeezing that can be done. What's the compression ratio like if you start with an image that's like 100kB (for the sake of experimentation). – Adam Cameron Jun 10 '12 at 11:47
  • @AdamCameron - also good point. I was thinking if 900x360 = 23k, 320x128 should be something much smaller. The images will eventually be user provied, so they will be larger than my already optimized (RIOT - http://luci.criosweb.ro/riot/) images. I wouldn't mind only reducing by a few Ks, but what doesn't go is the images being so blurred, although I'm setting quality to .99 and imageSetAntiAliasing. So a shrap IMG1 at 22K and 320x128px would be what I'm looking for. – frequent Jun 10 '12 at 12:23

1 Answers1

2

I think what you fiddle with are quality/speed of the resize algorithm, not compression.

To compress with better file size, set the JPEG compression quality using the quality attribute (default to 0.75)

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7945.html

If cfimage doesn't satisfy your needs, use imagemagick

Henry
  • 32,689
  • 19
  • 120
  • 221