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 )