PhpSigep\Pdf\ImprovedFPDF::memImage PHP Method

memImage() public method

public memImage ( $data, $x = null, $y = null, $w, $h, $link = '' )
    function memImage($data, $x = null, $y = null, $w = 0, $h = 0, $link = '')
    {
        //Display the image contained in $data
        $v = 'img' . md5($data);
        $GLOBALS[$v] = $data;
        $a = @getimagesize('var://' . $v);
        if (!$a) {
            $this->Error('Invalid image data');
        }
        $type = substr(strstr($a['mime'], '/'), 1);
        $this->Image('var://' . $v, $x, $y, $w, $h, $type, $link);
        unset($GLOBALS[$v]);
    }