On The Fly thumbnail/resize generation of images [duplicate]

你。 提交于 2019-12-02 12:38:30

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.

EDIT: 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 )

I'd recommend NOT to create thumbnails on the fly or at least caching them (for example by saving to the HD) You can generate them for example with phpThumb: http://phpthumb.sourceforge.net/ which uses GD or ImageMagick

Hope that helps.

I'm not familiar with many options, but as far as my experience goes I'd go for ImageMagick, it's quite fast when executed command-line. Updates on ImageMagick and backwards compatibility can be the cause of unforeseen bugs though. When generating many images on the fly it might be an idea to perform the thumbing on a different / dedicated server. And make sure to cache them.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!