加载两张图片还是加载一张并修改它?

发布于 2024-11-18 16:51:50 字数 105 浏览 4 评论 0原文

我的网站显示相同的图像,一张正常,另一张模糊,我在想在速度方面有什么更好的方法。上传时创建两张图像,其中上传一张正常图像和一张模糊图像到服务器,或者仅上传一张图像但使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

峩卟喜欢 2024-11-25 16:51:50

如果您使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文