Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart crop support #48

Closed
h2non opened this issue Jul 24, 2015 · 4 comments
Closed

Smart crop support #48

h2non opened this issue Jul 24, 2015 · 4 comments

Comments

@h2non
Copy link
Owner

h2non commented Jul 24, 2015

https://github.com/muesli/smartcrop

@h2non h2non changed the title Smartcrop support Smart crop support Jul 24, 2015
@jcupitt
Copy link

jcupitt commented Sep 28, 2016

Alternative smart crop in libvips:

https://gist.github.com/jcupitt/c2792a9b22e4e2544147

It's a slightly different algorithm. Rather than attempting to find the interesting part of an image, all it does is trim the most boring parts (found by estimating image entropy) off the longest axis until the image is square.

The idea is that the most common use for smartcrop is to square up images so that you can display a large number of images with different aspect ratios in a nice grid. This is a much simpler problem than trying to find the centre of interest in a picture.

@Dynom
Copy link
Collaborator

Dynom commented Apr 25, 2017

As of libvips version 8.5.0, there is a "smart crop" feature available. It's based on Sharp's smartcrop, which I think is the same as linked earlier here in the Issue.

See also: https://github.com/jcupitt/libvips/blob/c79f64ab7def94b23ca65abf46c4ca9e97e3c5db/libvips/conversion/smartcrop.c

@greut
Copy link
Contributor

greut commented May 18, 2017

should be closed by #145

@h2non
Copy link
Owner Author

h2non commented May 18, 2017

Smartcrop feature has been shipped in v1.0.8. Thank you @greut!

@h2non h2non closed this as completed May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants