Follow us on Twitter!
Things are more like they are now than they have ever been before. - Dwight D. Eisenhower
Monday, April 27, 2015
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 22
Guests Online: 20
TeamSpeak Online : 5 Members Online: 2

Registered Members: 88069
Newest Member: margeryjessica
Latest Articles
Our sponsor needs your help!


One of our sponsors needs your help, http://www.virginmediabusiness.co.uk/pitch-to-rich/grow/krystal-hosting/
Go check out their video and Don't forget to vote !


~ Thanks for your help
HBH
View Thread

HellBound Hackers | Computer General | Programming

Author

PHP image help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 08-04-09 20:41
Hey guys,

I am using PHP and the GD library to create a dynamic profile badge. The badge is made up of an image as a background, and has text on it about the user. My problem is that when I add the avatar picture, all the text and other graphics disappear...

$im is my background image
$avstring contains the avatar as a string

Here is a code snippit:

Code

$av = imagecreatefromstring($avstring);
imagecopy($im, $av, 15, 15, 0, 0, 100, 100);

$black = imagecolorallocate($im, 0, 0, 0);
imagestring($im, 5, 155, 35, "Name: ".$usr["Name"], $black);
imagestring($im, 5, 155, 55, "Pub: ".$usr["pub"], $black);





I then render the image, and the avatar loads fine, but my text is gone...

Any ideas?

Cheers


Author

RE: PHP image help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 08-04-09 20:51
Solved, had to put the imagecopy command at the end, just before rendering.

B)