加载两张图片还是加载一张并修改它?
我的网站显示相同的图像,一张正常,另一张模糊,我在想在速度方面有什么更好的方法。上传时创建两张图像,其中上传一张正常图像和一张模糊图像到服务器,或者仅上传一张图像但使用 gd 动态模糊第二张图像?
My website is showing same image, one normal and other is blurred and I'm thinking what is better method of doing it in terms of speed. Create two images upon uploading where it uploads one normal image and one blurred to server or upload only one image but blur second one on the fly using gd?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 GD,我会在上传时执行此操作并将它们保存为平面文件。
Apache 和其他 Web 服务器可以非常快地提供平面文件。
但是,我会考虑使用 http://www.graphicsmagick.org/ 进行图像处理。它比 Imagemagick 以及 PHP 的 GD 更快、更高效。
If you're using GD, I would do it at upload and save them as flat files.
Apache and other web servers can serve flat files remarkably fast.
However, I would look into using http://www.graphicsmagick.org/ to do the image manipulation. It's much, much faster and efficient than Imagemagick and most certainly PHP's GD.