Why should I resize an image in Coldfusion if the file size doen't decrease and the quality of the image suffers?

主宰稳场 提交于 2019-12-02 18:52:06

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/10964720/why-should-i-resize-an-image-in-coldfusion-if-the-file-size-doent-decrease-and

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!