Crops that keep the face, the dog, the surfer.

Every photo below is cropped live around the point focuspoint picks for it. Change the container shape and watch the crops follow. Tune the settings on the left to see how each one moves the point.

import {focusPoint} from '@alinea/focuspoint'

const {x, y} = focusPoint({data, width, height})
// centre every crop on (x, y), clamped to the image