autocrop.js test page
GitHub project
Choose a image
Or, run with the sample image
Parameter
{ bgColor: '#FFFFFF', alphaTolerance: 20, colorTolerance: 20, invertTolerance: 0.90, margin: '2%', allowInvert: true, marker: 'cropped' }
Original
Result