Log in

View Full Version : More specific.. Did some searching.



[Nicolas]
02-02-2011, 02:39 AM
Ok, mods, admins, or whoever can do it, please delete my other topic I just made. I don't know how to. I will use a different method here. How can I use an image map and change the coords of that image with an image that the user had uploaded? They would type in the link of the image. I don't know much about image maps, but with help of DD, this could work :) So like, on the left, the user has three boxes. Image, attack 1, and attack 2. In the image box, he/she would type in "Http://somewhere/apic.gif" then in the attacks he/she would put something like "Assault" and after they type it in, another box would come up. It would be the damage. Please help. Thank you! And btw, please delete the other one called something like 'Change parts of an image' I think. Thank you again! :D
--Nicolas

[Nicolas]
02-02-2011, 03:12 AM
How could I use this code in an image?

<?php
// Create image handle
$im = imagecreatetruecolor(200, 200);

// Allocate colors
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);

// Load the PostScript Font
$font = imagepsloadfont('font.pfm');

// Write the font to the image
imagepstext($im, 'Sample text is simple', $font, 12, $black, $white, 50, 50);

// Output and free memory
header('Content-type: image/png');

imagepng($im);
imagedestroy($im);
?>

Thanks! :D