public function output($quality = null)
    {
        header('Content-type: image/' . $this->original_info['format']);
        $this->save(-1, $quality);
        //die to stop execution
        die();
    }