PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Coding & Tutorials (http://www.phpdig.net/forum/forumdisplay.php?f=31)
-   -   PHP & GD (http://www.phpdig.net/forum/showthread.php?t=391)

MonoNexo 01-14-2004 11:07 AM

PHP & GD
 
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?

Thanks,

Matt

Charter 01-26-2004 03:38 PM

Hi. Perhaps try something like the following:
PHP Code:

<?php
  $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);
  
imagedestroy($im);
?>

Also, check here for other image functions.


All times are GMT -8. The time now is 03:53 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.