本文共 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/