脚本宝典收集整理的这篇文章主要介绍了php – GD图像叠加透明png,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
<? $dst_x = 0; // X-coordinate of destination point. $dst_y = 0; // Y --coordinate of destination point. $src_x = 163; // Crop Start X posITion in original image $src_y = 0; // Crop Srart Y position in original image $dst_w = 469; // Thumb width $dst_h = 296; // Thumb height $src_w = 469; // $src_x + $dst_w Crop end X position in original image $src_h = 296; // $src_y + $dst_h Crop end Y position in original image // Creating an image with true colors having thumb dimensions.( to merge with the original image ) $dst_image = imagecreatetruecolor($dst_w,$dst_h); // Get original image $src_image = imagecreatefromjPEg("http://www.ucatholic.COM/wp-content/uploads/2012/10/Sallixtus-631x295.jpg"); // Cropping imagecopyresampled($dst_image,$src_image,$dst_x,$dst_y,$src_x,$src_y,$dst_w,$dst_h,$src_w,$src_h); // Saving imagejpeg($dst_image,"images/crop.jpg"); $src = imagecreateFrompng('http://www.EdVizenor.com/images/saintCover.png'); /// THIS LINE NOT WORKING - - // Copy and merge imagecopymerge($dst_image,$src,469,296,100); header('Content-type: image/png'); imagegif($dst_image); ?>
以上是脚本宝典为你收集整理的php – GD图像叠加透明png全部内容,希望文章能够帮你解决php – GD图像叠加透明png所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。