$ftoW=$toH;
[size=; font-size: inherit,inherit] $ftoH=$toH;
///
[size=; font-size: inherit,inherit] if( $srcH<=$toH && $srcW<=$toW )
[size=; font-size: inherit,inherit] {
[size=; font-size: inherit,inherit] $ftoW=$srcW;
[size=; font-size: inherit,inherit] $ftoH=$srcH;
[size=; font-size: inherit,inherit] if(function_exists("imagecreatetruecolor"))
[size=; font-size: inherit,inherit] {
[size=; font-size: inherit,inherit] @$ni = imagecreatetruecolor($ftoW,$ftoH);
[size=; font-size: inherit,inherit] if($ni)
[size=; font-size: inherit,inherit] {
[size=; font-size: inherit,inherit] imagecopyresampled($ni,$im,0,0,0,0,$ftoW,$ftoH,$srcW,$srcH);
[size=; font-size: inherit,inherit] }
[size=; font-size: inherit,inherit] else
[size=; font-size: inherit,inherit] {
[size=; font-size: inherit,inherit] $ni=imagecreate($ftoW,$ftoH);
[size=; font-size: inherit,inherit] imagecopyresized($ni,$im,0,0,0,0,$ftoW,$ftoH,$srcW,$srcH);
[size=; font-size: inherit,inherit] }
[size=; font-size: inherit,inherit] }
[size=; font-size: inherit,inherit] 织梦模板 else
[size=; font-size: inherit,inherit] {
[size=; font-size: inherit,inherit] $ni=imagecreate($ftoW,$ftoH);
[size=; font-size: inherit,inherit] imagecopyresized($ni,$im,0,0,0,0,$ftoW,$ftoH,$srcW,$srcH);
[size=; font-size: inherit,inherit] }
[size=; font-size: inherit,inherit] switch ($srcInfo[2])
[size=; font-size: inherit,inherit] {
[size=; font-size织梦模板修改: inherit,inherit] case 1:
[size=; font-size: inherit,inherit] imagegif($ni,$toFile);
[size=; font-size: inherit,inherit] break;
[size=; font-size: inherit,inherit] case 2:
[size=; font-size: inherit,inherit] imagejpeg($ni,$toFile,100);
[size=; font-size: inherit,inherit] break;
[size=; font-size: inherit,inherit] case 3:
[size=; font-size: inherit,inherit] imagepng($ni,$toFile);
[size=; font-size: inherit,inherit] break;
[size=; font-size: inherit,inherit] case 6:
[size=; font-size: inherit,inherit] imagebmp($ni,$toFile);dede模板下载
[size=; font-size: inherit,inherit] break;
[size=; font-size: inherit,inherit] default:
[size=; font-size: inherit,inherit] return false;
[size=; font-size: inherit,inherit] }
[size=; font-size: inherit,inherit] imagedestroy($ni);
[size=; font-size: inherit,inherit] } ///
$toWH=$toW/$toH;
$srcWH=$srcW/$srcH;
if($toWH<=$srcWH)
{
$ftoW=$toW;
$ftoH=$ftoW*($srcH/$srcW);
}
else
{
$ftoH=$toH;
$ftoW=$ftoH*($srcW/$srcH);
}
关键词标签: 织梦 解决办法 图集
声明: 本文由我的SEOUC技术文章主页发布于:2023-07-17 ,文章织梦图集 上传图片小于设定尺寸 缩略图生成失败主要讲述图集,解决办法,织梦网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_28590.html
为你推荐与织梦图集 上传图片小于设定尺寸 缩略图生成失败相关的文章
网站建设技术SEOUC.COM
专注网站建设,SEO优化,小程序设计制作搭建开发定制网站等,数千家网站定制开发案例,网站推广技术服务。
5000+合作客服
8年从业经验
150+覆盖行业
|