src/Leevel/Seccode/Seccode.php
protected function makeBackground(): string
    {
        $resImage = imagecreatetruecolor($this->normalizeWidth(), $this->normalizeHeight());
        $resColor = imagecolorallocate($resImage, 255, 255, 255);

        if (false === $this->makeBackgroundWithImage($resImage)) {
            $this->makeBackgroundDefault($resImage);
        }

        ob_start();

        imagepng($resImage);

        imagedestroy($resImage);
        $background = ob_get_contents();

        ob_end_clean();

        return $background;
    }
protected function makeBackground(): string
    {
        $resImage = imagecreatetruecolor($this->normalizeWidth(), $this->normalizeHeight());
        $resColor = imagecolorallocate($resImage, 255, 255, 255);

        if (false === $this->makeBackgroundWithImage($resImage)) {
            $this->makeBackgroundDefault($resImage);
        }

        ob_start();

        imagepng($resImage);

        imagedestroy($resImage);
        $background = ob_get_contents();

        ob_end_clean();

        return $background;
    }
创建背景图像.

@return string