moccu / barbeque

Collection of tiny helpers and tools to make live easier.
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Add cropping with gravity #20

Closed schorfES closed 7 years ago

schorfES commented 7 years ago

Instead of enabling cropping through the template tag {% ultimatethumb 'sourceset' image '320x400,400x500' crop=True %} by setting crop=True we need to optionally pass the gravitiy as string. See https://www.imagemagick.org/script/command-line-options.php#gravity for the possible values. The mapping could be the following:

But I think we also need to support the imagemagick default values. So a full mapping can look like this:

schorfES commented 7 years ago

Sorry, wrong project. Issue moved to https://github.com/moccu/django-ultimatethumb/issues/7