<script src="js/smooth-shrink.js"></script>
SmoothShrink object, initialize, then shrink it.
var shrinker = new SmoothShrink();
shrinker.init("...image source URL...");
shrinker.shrink(width, height); // shrink with your own dimensions
shrinker.shrinkByScale(width); // OR shrink proportionally based on the width specified
var shrunkImageURL = shrinker.getShrunkImageURL();