function resizeImage($image, $prefix = '', $width = 266, $compression = 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
resizeImage($image, $prefix = '', $width = 266, $compression = 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$image, $prefix = '', $width = 266, $compression = 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
, $prefix = '', $width = 266, $compression = 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$prefix = '', $width = 266, $compression = 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= '', $width = 266, $compression = 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'', $width = 266, $compression = 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
, $width = 266, $compression = 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$width = 266, $compression = 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= 266, $compression = 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$compression = 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= 0) { //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
{ //判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
//判断操作系统转换图片名称编码 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
(substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
substr(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
(PHP_OS, 0, 3)) === 'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'WIN') { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
) { $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
{ $image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$image = iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= iconv('utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'utf-8', 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
, 'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'gbk', $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
, $image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$image); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
); } //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
} //获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
//获取图片相关信息 $imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo = getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
getimagesize($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
($image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$image); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
); $imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
['width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'width'] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
] = $imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
[0]; $imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
['height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'height'] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
] = $imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
[1]; $width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$width = $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= $imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
['width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'width'] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
] < $width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$width ? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
? $imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
['width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'width'] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
] : $width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$width; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
; if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
if(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
(!empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
empty($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
($imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
['width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'width']) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
]) && !empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
empty($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
($imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
['height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'height'])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
])) { switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
{ switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
switch ($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
($imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
['mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'mime']) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
]) { case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
{ case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
case 'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'image/jpeg': $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
: $imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgRes = imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= imagecreatefromjpeg($image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$image); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
); break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
break; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
; case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
case 'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'image/gif': $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
: $imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgRes = imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= imagecreatefromgif($image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$image); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
); break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
break; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
; case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
case 'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'image/png': $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
: $imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgRes = imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= imagecreatefrompng($image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$image); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
); break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
break; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
; case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
case 'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'image/bmp': $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
: $imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgRes = imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= imagecreatefromwbmp($image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$image); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
); break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
break; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
; } if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
} if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
if($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
($imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgRes) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
) { $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
{ $proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$proportion = $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= $width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$width / $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
/ $imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
['width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'width']; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
]; $height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$height = $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= $imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
['height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'height'] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
] * $proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$proportion; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
; $white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$white = imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= imagecreatetruecolor($width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$width, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
, $height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$height); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
); //缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
//缩小图片 imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
imagecopyresampled($white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$white, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
, $imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgRes, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
, 0, 0, 0, 0, $width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$width, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
, $height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$height, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
, $imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
['width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'width'], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
], $imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgInfo['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
['height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
'height']); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
]); $imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgName = $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= $prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$prefix ? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
? $prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$prefix . $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
. $this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$this->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
->nameToChina($image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$image) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
) : $this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$this->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
->nameToChina($image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$image); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
); $imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imageName = dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
= dirname($image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$image) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
) . DS . $imgName; if(file_exists($imageName)) { unlink($imageName); }
$imgName; if(file_exists($imageName)) { unlink($imageName); }
; if(file_exists($imageName)) { unlink($imageName); }
if(file_exists($imageName)) { unlink($imageName); }
(file_exists($imageName)) { unlink($imageName); }
file_exists($imageName)) { unlink($imageName); }
($imageName)) { unlink($imageName); }
$imageName)) { unlink($imageName); }
)) { unlink($imageName); }
{ unlink($imageName); }
unlink($imageName); }
$imageName); }
); }
}