public function getDataUri()
    {
        if (empty($this->image)) {
            $this->create();
        }

        ob_start();
        call_user_func('image'.$this->image_type, $this->image);
        $contents = ob_get_clean();

        return 'data:image/'.$this->image_type.';base64,'.base64_encode($contents);
    }
public function getDataUri()
    {
        if (empty($this->image)) {
            $this->create();
        }

        ob_start();
        call_user_func('image'.$this->image_type, $this->image);
        $contents = ob_get_clean();

        return 'data:image/'.$this->image_type.';base64,'.base64_encode($contents);
    }
public function getDataUri ( ) { if ( empty ( $ this -> image ) ) { $ this -> create ( ) ; } ob_start ( ) ; call_user_func ( 'image' . $ this -> image_type , $ this -> image ) ; $ contents = ob_get_clean ( ) ; return 'data:image/' . $ this -> image_type . ';base64,' . base64_encode ( $ contents ) ; }
Return the data URI.

@return string
Return the data URI .