Module for improving automatic image cropping in SilverStripe. Adds simple art-direction control by allowing you to set and crop from a focus point instead of the centre point of an image.
Clone or download
bummzack and jonom Ss4 improvements (#50)
* Add a custom field-type `DBFocusPoint`. Move all focus point calculations into this class.
Remove unneeded InterventionBackend.
* Changed translation files to simply use the `db_FocusPoint` fieldname.
* Changed FocusPointField to behave more like a normal FormField.
* Renamed Test-class to open up naming possibilites for future test-classes :)
* Implement migration task and auto-migration.
* Added react component.
* Update to CSS and SVG for gradient & crosshair.
* Flipped Y-Coordinate to have consistent math (-1 top/left, 1 bottom/right).
* Added more unit-tests.
* Added documentation about the build-tools.
Latest commit 16dedb9 Jan 30, 2018

README.md

FocusPoint: Smarter Image Cropping for SilverStripe

Build Status Latest Stable Version Latest Unstable Version License

The goal of this module is to introduce some basic art direction to control how images are cropped in SilverStripe.

Problem: SilverStripe crops all images from the centre. If the subject is off-centre, it may be cropped out.

Solution: FocusPoint allows you to tag the subject in an image and ensures it is not lost during cropping.

Comparison of cropping with and without FocusPoint

Requirements

SilverStripe ~4 (SS 3.1+ support available in earlier releases)

Documentation

To Do

  • Internationalisation
  • Advanced cropping options and interfaces (may be an additional module)
  • Auto detect focus point via Imagga API

Maintainer contact

jonathonmenz.com

Sponsorship

I don't have much time to donate to open source work anymore but if you're willing to sponsor the development of new features or updates I'm very happy to talk to you - please get in touch.

Just want to say thanks? You're welcome to make a small donation.

Donate via PayPal