View Full Version : use image with imagecreatefromjpeg(

02-27-2012, 07:53 AM
Hi I have a location map based on lon and lat, everything works fine

$im = imagecreatefromjpeg("earth.jpg");
$dotcolor = imagecolorallocate ($im, 255,255,0);//yellow

is their a way to use a image png as my location dot, instead of using the
imagecolorallocate code which produces a box like point?


02-27-2012, 11:51 AM
You can use imagecopyresampled() (http://php.net/manual/en/function.imagecopyresampled.php) to copy one image into another image.

If you just want a dot, what about using imagefilledellipse() (http://php.net/manual/en/function.imagefilledellipse.php)?

02-27-2012, 06:42 PM
I tried that before posting, I can't get that to work, I don't think the image
combines with the earth image, it just position's over it or something.

I'm just trying to get a round png location (point) on a earth image. I know
it can be done I see it all the time.


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum