如果文件大小没有减小并且图像质量受到影响,我为什么要在 Coldfusion 中调整图像大小? [英] Why should I resize an image in Coldfusion if the file size doen't decrease and the quality of the image suffers?

查看:11
本文介绍了如果文件大小没有减小并且图像质量受到影响,我为什么要在 Coldfusion 中调整图像大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想知道:我正在尝试在 Coldfusion8 中设置 自适应图像 处理程序,它可以调整图像的大小以适应更小的屏幕尺寸.

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.

问题:
那我为什么要费心调整大小呢?我还不如发送@900x360px @23K 的原始文件.至少与 320x1280 像素的调整大小的模糊图像相比,图像会更清晰.有没有办法让 Coldfusion 中的图像大小在文件大小和/或图像质量方面值得调整?

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?

感谢您的投入!Cldfu

Thanks for inputs!Cldfu

推荐答案

我认为你摆弄的是调整大小算法的质量/速度,而不是压缩.

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

要以更好的文件大小进行压缩,请使用 quality 属性设置 JPEG 压缩质量(默认为 0.75)

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

如果 cfimage 不能满足您的需求,请使用 imagemagick

If cfimage doesn't satisfy your needs, use imagemagick

这篇关于如果文件大小没有减小并且图像质量受到影响,我为什么要在 Coldfusion 中调整图像大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆