Login   Register  
PHP Classes
elePHPant
Icontem

PHP GD imagecopy problem

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Top level forums  >  PHP Specialists  >  General  >  PHP GD imagecopy problem  
Subject:PHP GD imagecopy problem
Summary:PHP GD imagecopy problem
Messages:2
Author:Dawid van Wyngaard
Date:2013-05-22 19:29:36
Update:2013-07-22 06:53:00
 

  1. PHP GD imagecopy problem   Reply  
Picture of Dawid van Wyngaard
Dawid van Wyngaard
2013-05-22 20:34:13
Hi,

I want to add an icon (16x16px), black and white in .png format to an existing .png file with bunch of text. What I get is a black square on top of the image with the text. Neither of the images have any transparent background. The code I used is as follows:

<?php
$source=imagecreatefrompng("message.png");
$img_get=imagecreatefrompng("smiley1.png");

imagecopy($source,$img_get, 5, 12, 20, 20, 20, 20);

header('Content-Type: image/png');
imagepng($source);
imagedestroy($source);
imagedestroy($img_get);
?>

Any ideas why this doing this, the black squared instead of the actual icon picture? Any suggestions welcome!

Regards,

Dawid

There is 1 reply in this thread, which is not being displayed.
Browsing this forum thread replies is available only to premium subscribers.


Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.