GD 函数合成图片有关问题(一张jpg,一张png)
Jun 13, 2016 am 11:34 AM
GD 函数合成图片问题(一张jpg,一张png)
RT:
请问用php怎么能合成两张图片呢?
一张是png 透明的底图,另一张是jpg 图片
现在想让jpg的图片合成到png的底图上面,成为一张新的图片,如何实现呢?
另外问下,是不是合成的图片要尺寸一样大呢?还是底图可以大点的?
本人在网上也找了一些方法,但好像都不行
$path_1 = "topic_assets/522592b5d61cb_ip4.jpg";<br /> $path_2 = "topic_assets/topic_border_android.png";<br /> //echo $path_1;<br /> $image=imagecreatefromjpeg($path_1); <br /> $wm=imagecreatefrompng($path_2); <br /> $im=imagecreatetruecolor(imagesx($image),imagesy($image)); <br /> imagecopy($im,$image,0,0,0,0,imagesx($image),imagesy($image)); <br /> imagecopy($im,$wm,0,0,0,0,imagesx($wm),imagesy($wm));
做过类似的,给个解决方案吧...

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solution: Your organization requires you to change your PIN

How to adjust window border settings on Windows 11: Change color and size

How to change title bar color on Windows 11?

How to enable or disable taskbar thumbnail previews on Windows 11

OOBELANGUAGE Error Problems in Windows 11/10 Repair

10 Ways to Adjust Brightness on Windows 11

How to turn off private browsing authentication for iPhone in Safari?
