View Full Version : PHP & GD

01-14-2004, 12:07 PM
Howdy folks:

Here is my perdiciment. I have a map for a game I play. In the game, you can use a Sextant to find your x,y cords. I'm trying to make a program that when given the x and y cords will place a star or circle where the cords meet. For ease treat the map as starting at each corner of the map with no border, I can fix that by changing the x,y cords. But I can't seem to find any resources on how to just put an image at a specific cordinate without using a huge program that creates Scatter graphs.

Map: http://mononexo.com/map/map.jpg

Any tips? Snippets?



01-26-2004, 04:38 PM
Hi. Perhaps try something like the following:

$pic = "filename.jpg"; // jpg filename
$font = 5; // can be 1, 2, 3, 4, or 5
$xpos = 50; // zero is leftmost position
$ypos = 10; // zero to topmost position
$qual = 30; // zero (worst) to 100 (best)
$symb = "*"; // symbol to denote x,y point
$im = imagecreatefromjpeg($pic);
$red = imagecolorallocate($im,255,0,0);
imagestring($im, $font, $xpos, $ypos, $symb, $red);
imagejpeg($im, '', $qual);

Also, check here (http://www.php.net/manual/en/ref.image.php) for other image functions.