 			throw "Can't initialize cropme: destinationWidth needs to be lower than width"
 		if scope.ratio and not scope.height
 			scope.height = scope.destinationHeight
-		scope.type ||= "png"
 
 	template: """
 		<div

			scope.croppedHeight = scope.heightCropZone / zoom
			$timeout ->
				ctx.drawImage imageEl, scope.xCropZone / zoom, scope.yCropZone / zoom, scope.croppedWidth, scope.croppedHeight, 0, 0, scope.croppedWidth, scope.croppedHeight
				base64ImageData = canvasEl.toDataURL('image/' + scope.type).replace("data:image/#{scope.type};base64,", "")
				raw = $window.atob base64ImageData
				blob = new Blob [raw], {type: "image/#{scope.type}"}
				$rootScope.$broadcast "cropme", blob
]


		dragEnterLeave = (evt) ->
			evt.stopPropagation()
			evt.preventDefault()
			$apply ->
				scope.dropText = "Drop files here"
				scope.dropClass = ""
		dropbox = element[0]
