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

attention mode crop problems (0.18) #832

Closed
puzrin opened this issue May 30, 2017 · 12 comments
Closed

attention mode crop problems (0.18) #832

puzrin opened this issue May 30, 2017 · 12 comments

Comments

@puzrin
Copy link

puzrin commented May 30, 2017

To continue #727.

I do image thumbnals, with slightly reduced width (170*150px), and some images a cropped on wrong side. See sources below for experiments.

Properly cropped:

Improperly cropped (at wrong side):

Result:

cropped

I don't know where the problem happens, because this bug was reported to libvips and fixed there.

@puzrin puzrin changed the title attention mode crop problems attention mode crop problems (0.18) May 30, 2017
@kleisauke
Copy link
Contributor

I think this is the result of libvips check for the presence of skin tones, see:
skin-check1
skin-check2

vipsthumbnail -s 170x150 --smartcrop attention input.jpg gives the same results as you've specified.

/cc @jcupitt

@puzrin
Copy link
Author

puzrin commented May 30, 2017

@kleisauke thanks! Seems i'm lucky with finding bad images, those were first 3 random ones :).

smartcrop.js works better.

@jcupitt should we move to to libvips tracker?

@jcupitt
Copy link
Contributor

jcupitt commented Jun 7, 2017

Hello, thanks for the samples, I've made an issue on libvips for this: https://github.com/jcupitt/libvips/issues/672

@puzrin
Copy link
Author

puzrin commented Jun 9, 2017

@KyleAMathews
Copy link

@lovell I think we need to update sharp to use libvips 8.5.7 to get the improvements?

@lovell
Copy link
Owner

lovell commented Aug 29, 2017

@KyleAMathews Yes, that's right. sharp v0.19.x will depend upon (and provide) libvips v8.6.0.

@KyleAMathews
Copy link

Great!

What version of libvips is sharp 0.18 on? It looks like 8.5.5 still? My question was about getting the libvips improvements created from this thread which were added in libvips 8.5.7.

@lovell
Copy link
Owner

lovell commented Aug 30, 2017

@KyleAMathews sharp v0.18.2 requires a minimum of libvips v8.5.5 and therefore pre-built binaries for this specific version are provided for local use. During installation, sharp will look for and work with a globally-installed version of libvips equal to or greater than this. This means libvips v8.5.7 can be used with sharp v0.18.2 but you'll need to globally install it first.

@KyleAMathews
Copy link

@lovell any reason not to bump the version of libvips that gets installed to the latest in the 8.5.x series? 8.5.9 was just released yesterday https://github.com/jcupitt/libvips/releases/tag/v8.5.9

@lovell
Copy link
Owner

lovell commented Oct 13, 2017

@KyleAMathews The version of the prebuilt libvips binaries is fixed per sharp release. To bump the patch version to libvips v8.5.9 we'd need to also bump a new patch version of sharp, e.g. v0.18.5. Unfortunately this would pick up an SVG bug introduced in libvips v8.5.7 that v8.6.0 fixes - see https://github.com/jcupitt/libvips/pull/724

To makes things a little easier (for me at least) to manage and help troubleshoot, I've been providing the same version of libvips for all patch releases of a given minor version of sharp.

sharp v0.19.0 is currently sitting in the suit branch and will be merged to the master branch and published as soon as libvips v8.6.0 is out.

It'll be interesting to see how much impact moving gatsby from sharp v0.17.3 to v0.19.0 will have on the libvips download stats. Currently ~60% of libvips binaries requests are for v8.4.2 (as used by sharp v0.17.x).

@KyleAMathews
Copy link

Makes sense! Looking forward to libvips 8.6 & sharp v0.19.0!

@lovell
Copy link
Owner

lovell commented Jan 12, 2018

sharp v0.19.0 with libvips v8.6.1 now available.

@lovell lovell closed this as completed Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants