标签:
<?php $srcFile="../images/logo.jpg"; $dstFile="uploads/des_big.jpg"; $srcFileInfo=getimagesize($srcFile); //print_r( $srcFileInfo); $src_w=$srcFileInfo[0]; $src_h=$srcFileInfo[1]; $dstFileInfo=getimagesize($dstFile); $srcMime=$srcFileInfo[‘mime‘]; $dstMime=$dstFileInfo[‘mime‘]; $createSrcFun=str_replace("/","createfrom",$srcMime); $createDstFun=str_replace("/","createfrom",$dstMime); $outDstFun=str_replace("/",null,$dstMime); $dst_im=$createDstFun($dstFile); $src_im=$createSrcFun($srcFile); imagecopymerge($dst_im,$src_im,0,0,0,0,$src_w,$src_h,20); header("content-type:".$dstMime); $outDstFun($dst_im); imagedestroy($src_im); imagedestroy($dst_im); ?>
标签:
原文地址:http://www.cnblogs.com/jacson/p/4255479.html