Intervention / image

PHP Image Processing
https://image.intervention.io
MIT License
13.94k stars 1.5k forks source link

smart crop feature #1002

Open aaronpk opened 4 years ago

aaronpk commented 4 years ago

This is a great library, but I'm really missing a "smart crop" feature! There's a handful of PHP libraries that do this, but it would be great to be integrated into this code.

Here's some example code for doing just the smart crop: https://github.com/xymak/smartcrop.php

Here's an example of an alternative image processing library that has smart crop built in: https://kosinix.github.io/grafika/smart-crop.html

This is a lighter weight version of doing full on face detection as described in #75 since it is just looking for "interestingness" in the image.

It'd be super great if this were built in!

olivervogel commented 11 months ago

Sounds like a good idea. I'm just worried that it won't be possible to implement it properly. For example the library mentioned iterates through every single pixel of the image, which can quickly run into the millions and become very resource-intensive.