jwagner / smartcrop.js

Content aware image cropping

Home Page:http://29a.ch/2014/04/03/smartcrop-content-aware-image-cropping

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Boost not working

CapnMarius opened this issue · comments

I'm trying to use the boost option to get a crop in a specific area but it isn't working.

500x500 image

options: {
width: 100,
height: 100,
minScale: 0.1,
boost: [{
x: 450,
y: 450,
width: 1,
height: 1,
weight: 1
}]
}

It returns a crop area far away of the given boost point.

Am I missing some options here?

Thanks for your help!

You are boosting a single pixel by 1, this will not do much to the result. I clarified this not in the example. Try boosting a slightly bigger area, that should do the trick.