	protected function gdImage($image, $filename, $destformat, $mime, $jpgQuality = null ) {

		if (! $jpgQuality) {
			$jpgQuality = $this->options['jpgQuality'];
		}
		if ($destformat) {
			switch ($destformat) {
				case 'jpg':
					$mime = 'image/jpeg';
					break;
				case 'gif':
					$mime = 'image/gif';
					break;
				case 'png':
				default:
					$mime = 'image/png';
					break;
			}
		}
		switch ($mime) {
			case 'image/gif':
				return imagegif ($image, $filename);
			case 'image/jpeg':
				return imagejpeg($image, $filename, $jpgQuality);
			case 'image/wbmp':
				return imagewbmp($image, $filename);
			case 'image/png':
			default:
				return imagepng($image, $filename);
		}
	}
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.