public function getCropDimensions() {
		$x = $this->getCropX();
		$y = $this->getCropY();
		$cropWidth = $this->getCropWidth();
		$cropHeight = $this->getCropHeight();
		$width = $cropWidth;
		$height = $cropHeight;

		// Normalise the width/height with respect to the aspect ratio
		$maxWidth = $this->getMaxWidth();
		$maxHeight = $this->getMaxHeight();

		$aspectRatio = $this->getAspectRatio();


		if($width < 1 || $height < 1) {
			throw new \InvalidArgumentException('Values must be over 1');
		}

		// Fix the aspect ratio if the crop is wrong
		// This must happen first so invalid values can be compensated for
		if($width / $height != $aspectRatio) {
			$height = $width / $aspectRatio;
		}

		if($width > $maxWidth) {
			$scaleDownRatio = $cropWidth / $maxWidth;
			$height = $height / $scaleDownRatio;
			$width = $maxWidth;
		}

		if($height > $maxHeight) {
			$scaleDownRatio = $cropHeight / $maxHeight;
			$width = $width / $scaleDownRatio;
			$height = $maxHeight;
		}

		return array(
			// src_x, src_y
			'x' => $x,
			'y' => $y,
			// dst_w, dst_h
			'width' => ceil($width),
			'height' => ceil($height),
			// src_w, src_h
			'crop_width' => $cropWidth,
			'crop_height' => $cropHeight,
		);
	}