abidibo.net

Specify the image subject in django admin

django

I've just released a new django package: django-subject-imagefield.

Basically, it is an enhanced version of the core ImageField, which adds support for the subject location feature.

You may specify a subject_location model field (as you can do for the width and height properties) and then in the admin you'll find a widget which let's you easily choose (with a click or drag and drop on the image preview) the subject position and store it.

 

It's a nice tool to use in couple with some image manipulator package, like sorl-thumbnail, because then you can easily crop the image considering the subject as the central point, and probably the result will be smarter than one obtained with the "smart" crop feature which of course, considers entropy (I wrote time ago' an article on how to develop smart cropping using entropy in PHP, if you're interested).

Subscribe to abidibo.net!

If you want to stay up to date with new contents published on this blog, then just enter your email address, and you will receive blog updates! You can set you preferences and decide to receive emails only when articles are posted regarding a precise topic.

I promise, you'll never receive spam or advertising of any kind from this subscription, just content updates.

Subscribe to this blog

Comments are welcome!

blog comments powered by Disqus

Your Smartwatch Loves Tasker!

Your Smartwatch Loves Tasker!

Now available for purchase!

Featured