src/Modules/Imager/GDDriver.php
public function render($format = 'image/jpeg', $quality = 80)
    {
        switch ($format) {
            case 'image/jpeg':
                header('Content-Type: image/jpeg');
                $background = $this->getJPGBackground();
                imagejpeg($background, null, $quality);
                imagedestroy($background);
                break;
            case 'image/png':
                header('Content-Type: image/png');
                imagesavealpha($this->image_handler, true);
                imagepng($this->image_handler);
                break;
            case 'image/gif':
                header('Content-Type: image/gif');
                imagegif($this->image_handler);
                break;
            default:
                throw new \LogicException("Image type '" . $format . "' don`t support");
        }
    }
public function render($format = 'image/jpeg', $quality = 80)
    {
        switch ($format) {
            case 'image/jpeg':
                header('Content-Type: image/jpeg');
                $background = $this->getJPGBackground();
                imagejpeg($background, null, $quality);
                imagedestroy($background);
                break;
            case 'image/png':
                header('Content-Type: image/png');
                imagesavealpha($this->image_handler, true);
                imagepng($this->image_handler);
                break;
            case 'image/gif':
                header('Content-Type: image/gif');
                imagegif($this->image_handler);
                break;
            default:
                throw new \LogicException("Image type '" . $format . "' don`t support");
        }
    }
@param string $format
@param integer $quality

@throws \LogicException