This module uses a few techniques, like face detection or entropy-based measure, to calculate the focal point of an image in order to provide a better "scale and crop" action.

Unlike other similar modules, Image Focus works with any image toolkit (both GD and Image Magick) and does not require any extra user input.

(The download is quite large because there are pattern data for face detection.)

Installation

Enable this module, replace 'imagecache_scale_and_crop' with 'image_focus_scale_and_crop' action in the preset edit page.

Known problems

  • The Face Detection algorithm implementation in PHP is very slow and might cause timeout. Please see the README file and test carefully.
  • Only one face could be detected. It results in a wrong focal point when there is multiple faces. Two solutions: either improve the algorithm implementation or do not use it (by setting the maxsize threshold = 0, see README).

Project information

Releases