Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

PNG 24?

images php coding issues or problems here.

Moderators: macek, egami, gesf

PNG 24?

Postby jtaylortoo » Thu Feb 23, 2012 4:43 pm

I've searched high and low and I see lots of talk but I can't figure out what I've done wrong. Can anyone help me fix this code so I can merge PNG 24 images together to build a chair.

This code:
________________________________

$dest = imagecreatefrompng("images/base.png");
$src = imagecreatefrompng("images/back.png");
$arm = imagecreatefrompng("images/arms.png");

imageAlphaBlending($dest, false);
imageSaveAlpha($dest, true);

header("Content-Type: image/png");

imagecopymerge($dest, $src, 0, 0, 0, 0, 618, 800, 100);
// imagecopymerge($dest, $arm, 0, 0, 0, 0, 618, 800, 100);

imagepng($dest);
imagedestroy($src);
imagedestroy($dest);
________________________________

Yields the attached picture.
Attachments
png24tests.php.png
png24tests.php.png (142.82 KiB) Viewed 276 times
jtaylortoo
New php-forum User
New php-forum User
 
Posts: 1
Joined: Thu Feb 23, 2012 4:35 pm

Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.