$file1 = "aa.jpg"; $maxWidth = 830; function resizeImage($im,$maxwidth,$maxheight,$name,$filetype) { $pic_width = imagesx($im); $pic_height = imagesy($im); if(($maxwidth && $pic_width > $maxwidth) || ($maxheight && $pic_height > $maxheight)) { if($maxwidth && $pic_width>$maxwidth) { $widthratio = $maxwidth/$pic_width; $resizewidth_tag = true; } if($maxheight && $pic_height>$maxheight) { $heightratio = $maxheight/$pic_height; $resizeheight_tag = true; } /* if($resizewidth_tag && $resizeheight_tag) { if($widthratio
php设置宽高比例,php 等比例缩小宽高
最新推荐文章于 2023-12-11 13:12:00 发布