|
Posted by Ubantu Rococo on 01/25/06 14:10
>
> I don't think imagejpeg works as you think it does. It outputs an image's
> actual binary data, so you're essentially trying to output a jpeg image
> with HTML tags before and after it - which won't work. What you need to
> do, is put the PHP code only into a file, called say image.php. Then, in
> your HTML document (the rest of the code above), just put an image tag in:
> <img src="image.php">. That will display the image in the HTML page. You
> can even have javascript to work out where you click on the image, and
> then update its url like this:
>
> <img src="image.php?x=10&y=22">, and the image.php can then add something
> at those co-ordinates to demonstrate it has been selected.
Thanks, I understand now, I think....
Could I just put the imagecopy routine in an external file (called
getWorldMap.php, with the getWorldMap() function contained
within) and then do:
<?php include("getWorldMap.php");
$wm = getWorldMap(); // $wm is the resource,copied from WorldMap
imagejpg($wm);
?>
Navigation:
[Reply to this message]
|