	private function resize($src, $srcImgInfo, $maxWidth, $maxHeight, $quality, $preserveExif) {
		$zoom = min(($maxWidth/$srcImgInfo[0]),($maxHeight/$srcImgInfo[1]));
		$width = round($srcImgInfo[0] * $zoom);
		$height = round($srcImgInfo[1] * $zoom);
		
		if (class_exists('Imagick', false)) {
			return $this->resize_imagick($src, $width, $height, $quality, $preserveExif);
		} else {
			return $this->resize_gd($src, $width, $height, $quality, $srcImgInfo);
		}
	}
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.