We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Automatic focal points for images

Formal Metadata

Title
Automatic focal points for images
Title of Series
Number of Parts
54
Author
Contributors
License
CC Attribution 3.0 Germany:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
This is the tastiest presentation of the Plone conference! A customer of Zest has images of delicious cakes, bread, cookies. But a cropped version of such an image often does not show the yummy cake, but a blurred cup of tea in the background. Solution: automatic focal point detection. We could use a smart imaging service like Thumbor. But the latest alpha release with Python 3 support is one and a half years old. The part that actually detects the focal points is opencv, with help from numpy. Can we call this directly instead? Yes we can. Can we do this from within Plone? Yes, but we need a patch. In this talk, to refresh our memories, we will first look at what the various scale modes/directions do in Plone. Since the 'down' direction or 'contain' mode is the only one that actually does image cropping, we will focus on that. We will go through the code of the focal point detection, and show the result. Lastly, we will look at an idea to make image handling in Plone more pluggable, using a transform chain.