On The Fly缩略图/调整图像生成大小 [英] On The Fly thumbnail/resize generation of images

查看:142
本文介绍了On The Fly缩略图/调整图像生成大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

PHP图像动态调整大小与存储调整大小的图像

我想知道什么是动态调整图像大小的最佳,最快和资源最有效的方法?我有想法在请求时动态地从照片库生成缩略图和特殊尺寸的图像。

I was wondering what is the best, fastest and most resource efficient way to resize images on the fly? I have the idea of generating thumbnails and special sizes of images from a photo gallery on-the-fly when they are requested.

这是个好主意吗?什么是最好的方式?

Is this a good idea? and what is the best way?

PHP,Imagemagick,litespeed服务器

PHP, Imagemagick, litespeed server

推荐答案

我已经使用Imagemagick成功创建了一个动态图像重构应用程序。性能很好,我可以通过一个宁静的请求调整大小/裁剪/水印/重新格式化等。我使用memcache来缓存重构图像的二进制blob,这给我带来了巨大的性能提升。

I have successfully created a on the fly image refactoring application using Imagemagick. The performance is great and I am able to resize/crop/watermark/reformat etc all via a restful request. I use memcache to cache the binary blob of the refactored image and this gives me a massive performance boost.

编辑:我使用了Java Imagemagick libs最初并且一直存在问题,PHP库是更好的imho(这是大约一年前,它可能是Java库已经改进)

I used the Java Imagemagick libs initially and kept running into issues, the PHP libs are far better imho ( this was about a year ago, its possible that the Java libs have improved )

这篇关于On The Fly缩略图/调整图像生成大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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