/**
* Outputs the image.
*
* @see XenForo_Image_Abstract::output()
*/
public function output($outputType, $outputFile = null, $quality = 85)
{
if ($quality == 85)
{
$quality = 90;
}
switch ($outputType)
{
case IMAGETYPE_GIF: $success = imagegif($this->_image, $outputFile); break;
case IMAGETYPE_JPEG: $success = imagejpeg($this->_image, $outputFile, $quality); break;
case IMAGETYPE_PNG:
// "quality" seems to be misleading, always force 9
$success = imagepng($this->_image, $outputFile, 9, PNG_ALL_FILTERS);
break;
default:
throw new XenForo_Exception('Invalid output type given. Expects IMAGETYPE_XXX constant.');
}
return $success;
}