高清晰GD缩略图生成方法
——————————————————————————–
gd、gd2都适用的写法。
[code]<?php
$image = "vintdev.JPG"; // 原图
$thumbw = 200; // 期望的目标图宽
$thumbh = 50; // 期望的目标图高
$size = getimagesize($image); // 获取原图大小
$scale = min($thumbw/$size[0], $thumbh/$size[1]); // 计算缩放比例 Read the rest of this entry »