Respect maximum dimensions of image

Moved feathering from the 'applying' part to the 'detection' part