1
votes

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.

3

3 Answers

1
votes

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.

0
votes

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.

0
votes

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.