$image = "vintdev.JPG"; // 原图
$imgstream = file_get_contents($image);
$im = imagecreatefromstring($imgstream);

解决方案 »

  1.   

    用GD库往上面描绘
    $im=imagecreate(286,93); //creat blank image object
    imagefill($im,0,0,imagecolorallocate($im, 255, 255, 255));//image fill white
    imagestring($im,5,20,35,"[DO NOT LEECH US RESOURCE!]",imagecolorallocate($im, 255, 0, 0));
    imagepng($im); //show image
    imagedestroy($im); //clear
    exit;
    }
    /*=================*/$im = @imagecreatefrompng ("ipcover_org.png");//load image$color=imagecolorallocate($im, 0, 0, 0); //allocate color for font(black)imagestring($im,4,130,11,"[".$_SERVER["REMOTE_ADDR"]."]",$color); //show IP
    imagestring($im,4,120,30,"[".show_browser()." / ".show_system()."]",$color); //show browser and systemimagepng($im); //show image
    imagedestroy($im); //clear
    你可以去研究一下GD库的方法
      

  2.   

    先判断图片格式,选用相应函数,如果已知格式,直接调用!
    int imagecreatefrompng(string filename);
    int imagecreatefromgif(string filename);
    int imagecreatefromjpeg(string filename);参数 filename 可以是本地端的文件,也可以是网络的 URL 位址,
    如:$im=imagecreatefromgif("images\\some.gif");接分!
      

  3.   

    怎么不看看手册,或者到php.net上面去看看呢
      

  4.   

    偶的FreeImage还没release,不然的话很容易解决你的问题。
    查看效果图:
    http://blog.csdn.net/ezdevelop/archive/2004/07/03/32933.aspx