博客
关于我
php生成二维码到图片上
阅读量:796 次
发布时间:2023-03-01

本文共 581 字,大约阅读时间需要 1 分钟。

class codeImg

{
private $date, $img, $main, $width, $height, $target, $white;

public function constr($source)  
{
$this->date = '' . date('Ymd') . '/';
$this->img = $this->date . md5($source) . '.jpg';
$this->main = imagecreatefromjpeg($source);
$this->width = imagesx($this->main);
$this->height = imagesy($this->main);
$this->target = imagecreatetruecolor($this->width, $this->height);
$this->white = imagecolorallocate($this->target, 255, 255, 255);
imagefill($this->target, 0, 0, $this->white);
imagecopyresam
}
// 其他方法和属性声明(如果有)

}

转载地址:http://axtfk.baihongyu.com/

你可能感兴趣的文章