开发者

PHP Image Resize and Cropping

Is there anything out there in the PHP world with equivalent functionality to SORL thumbnail (a Django开发者_高级运维 project).

Specifically: 1) It caches results (generating thumbnails on the fly is too cpu intensive). 2) It provides a smart cropping feature that crops to fit based on image entropy (so it doesn't just crop to center, but rather crops where the 'action' is).

The big feature I'm looking for is the smart cropping ability.


Only image manipulator I knew off the bat was

php.net/manual/en/book.image.php

But after some quick Googling found

http://www.ajquick.com/programming/thumbnail/

Hope one of those helps.


I found a drupal module from which I can lift some php code:

http://github.com/dylantack/codename_cornbaby

It's actually based on the same django-sorl-thumbnail approach cited, so that's perfect.


If you do land up on this question, though its a very old one, you can try tools like ImageKit.io which provide smart cropping out of the box. It uses face and feature detection internally to make the necessary computations for smart crop. ImageKit also has a face-crop mode that picks out the face from the original image to create a thumbnail.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜