php
//imagecopy(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w..., int src_h );
//将 src_im 图像中坐标从 src_x,src_y 开始,
//宽度为 src_w,高度为 src_h 的一部分拷贝到 dst_im 图像
//中坐标为 dst_x...$image=’123.jpg’;//原图片地址
$img=getimagesize($image);//获取图片信息,返回一个数组
switch($img[2]){
case 1:
$im...php
$sm_new=imagecreatetruecolor(40,30);
imagecopyresized($sm_new,$im,0,0,0,0,40,30,$img[0],$img[1])