function getImageBase64($image, callback){
	var result = $image.cropper('getCroppedCanvas'),
	imageBase64 = result.toDataURL(uploadedImageType),
	reader = new FileReader(), img = new Image(),
	canvas = document.createElement('canvas'),
	context = canvas.getContext('2d');
	img.src = imageBase64;
	img.onload = function() {
		var originWidth = this.width, originHeight = this.height,
		targetWidth = originWidth, targetHeight = originHeight;
		if(originWidth > maxWidth || originHeight > maxHeight) {
			if(originWidth / originHeight > maxWidth / maxHeight) {
				targetWidth = maxWidth;
				targetHeight = Math.round(maxWidth * (originHeight / originWidth));
			} else {
				targetHeight = maxHeight;
				targetWidth = Math.round(maxHeight * (originWidth / originHeight));
			}
		}
		canvas.width = targetWidth;
		canvas.height = targetHeight;
		context.clearRect(0, 0, canvas.width, canvas.height);
		context.drawImage(img, 0, 0, canvas.width, canvas.height);
		imageBase64 = canvas.toDataURL(uploadedImageType);
		callback(imageBase64);
	};
}
Change the default options.
@param {Object} options - The new default options.