Pop\Image\Imagick::output PHP Метод

output() публичный Метод

Output the image object directly.
public output ( boolean $download = false ) : Imagick
$download boolean
Результат Imagick
    public function output($download = false)
    {
        // Determine if the force download argument has been passed.
        $attach = $download ? 'attachment; ' : null;
        $headers = array('Content-type' => $this->mime, 'Content-disposition' => $attach . 'filename=' . $this->basename);
        $response = new \Pop\Http\Response(200, $headers);
        if ($_SERVER['SERVER_PORT'] == 443) {
            $response->setSslHeaders();
        }
        if (null !== $this->compression) {
            $this->resource->setImageCompression($this->compression);
        }
        if (null !== $this->quality) {
            $this->resource->setImageCompressionQuality($this->quality);
        }
        $response->sendHeaders();
        echo $this->resource;
        return $this;
    }