ecshop缩略图片是
原始图高>宽,则以高度为准生成缩略图;
原始图高<宽,则以宽度为准生成缩略图。
基实这种方式并不是很合理
打开/includes/ cls_image.php 这个文件,找到代码中处理缩略尺寸的代码,然后修改为以下代码即可……
以前的那样的话,商品如果比例不对,ECSHOP的图片处理,会自动有留白出来,照这样改完以后,就没有了……
<?php
....
if ($org_info[0] / $thumb_width > $org_info[1] / $thumb_height)
{
// $lessen_width = $thumb_width;// $lessen_height = $thumb_width / $scale_org;
$lessen_width = $thumb_height * $scale_org;
$lessen_height = $thumb_height;
}
else
{
$lessen_width = $thumb_width;
$lessen_height = $thumb_width / $scale_org;
//$lessen_width = $thumb_height * $scale_org;
//$lessen_height = $thumb_height;
}
...
?>
评论 (0)