Jump to content

GD functions?


Zoofu

Recommended Posts

<?php
include "./globals.php";
if($_GET['id']) {
$user = mysql_fetch_object(mysql_query("SELECT * FROM `users` WHERE `id`=". $_GET['id']));
header("Content-type: image/png;");
$col = imagecreate(1,1);
$black = imagecolorallocate($col,0,0,0);
$back = imagecreatefrompng($user->avatar_background);
$base = imagecreatefrompng($user->avatar_base);
imagealphablending($base,true);
imagecopy($back,$base,0,0,0,0,110,175);
imagepng($back);
imagedestroy($back);
} else 
die("Error: ID not specified");
?>

 

 

I need it to be something like: hopeful.png

 

I used this script structure (sort of) to make customisable avatars... But I dont know how to add Text into it, or position the images in certain places, not just overlapping.

Link to comment
https://forums.phpfreaks.com/topic/188265-gd-functions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.