dist/js/cropjs.js
function (url, onImageReady, applyAutocrop) {
            var _this = this;

            this.toggleLoadingImage(true);
            this.clear();
            this._applyAutocrop = (applyAutocrop !== false);

            this._image = new IMSoftcrop.Image(
                IMSoftcrop.Ratio.hashFnv32a(url),
                this
            );

            this._image.load(
                url,
                function () {
                    _this.setZoomToImage(false);
                    _this.centerImage(false);
                    _this.updateImageInfo(false);

                    if (_this._autocrop) {
                        _this.detectDetails();
                        _this.detectFaces();
                    }
                    else {
                        _this.toggleLoadingImage(false);
                    }

                    _this.applySoftcrops();
                    _this.redraw();

                    if (typeof onImageReady === 'function') {
                        onImageReady.call(_this, _this._image);
                    }
                }
            );
        }
function (url, onImageReady, applyAutocrop) {
            var _this = this;

            this.toggleLoadingImage(true);
            this.clear();
            this._applyAutocrop = (applyAutocrop !== false);

            this._image = new IMSoftcrop.Image(
                IMSoftcrop.Ratio.hashFnv32a(url),
                this
            );

            this._image.load(
                url,
                function () {
                    _this.setZoomToImage(false);
                    _this.centerImage(false);
                    _this.updateImageInfo(false);

                    if (_this._autocrop) {
                        _this.detectDetails();
                        _this.detectFaces();
                    }
                    else {
                        _this.toggleLoadingImage(false);
                    }

                    _this.applySoftcrops();
                    _this.redraw();

                    if (typeof onImageReady === 'function') {
                        onImageReady.call(_this, _this._image);
                    }
                }
            );
        }
function ( url , onImageReady , applyAutocrop ) { var _this = this ; this . toggleLoadingImage ( true ) ; this . clear ( ) ; this . _applyAutocrop = ( applyAutocrop !== false ) ; this . _image = new IMSoftcrop . Image ( IMSoftcrop . Ratio . hashFnv32a ( url ) , this ) ; this . _image . load ( url , function ( ) { _this . setZoomToImage ( false ) ; _this . centerImage ( false ) ; _this . updateImageInfo ( false ) ; if ( _this . _autocrop ) { _this . detectDetails ( ) ; _this . detectFaces ( ) ; } else { _this . toggleLoadingImage ( false ) ; } _this . applySoftcrops ( ) ; _this . redraw ( ) ; if ( typeof onImageReady === 'function' ) { onImageReady . call ( _this , _this . _image ) ; } } ) ; }
Load image from url
@param url
@param onImageReady Callback after image has been loaded
@param autocropImage Optional, default true, if autocrops should be applied
Load image from url