Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder sonny's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Posts
    567
    Thanks
    88
    Thanked 0 Times in 0 Posts

    use image with imagecreatefromjpeg(

    Hi I have a location map based on lon and lat, everything works fine
    PHP Code:
    $im imagecreatefromjpeg("earth.jpg");
    $dotcolor imagecolorallocate ($im255,255,0);//yellow
    imagefilledrectangle($im,$pt["x"]-2,$pt["y"]-2,$pt["x"]+2,$pt["y"]+2,$dotcolor); 
    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?

    Thanks
    Sonny

  • #2
    Regular Coder
    Join Date
    Jan 2012
    Posts
    134
    Thanks
    0
    Thanked 32 Times in 32 Posts
    You can use imagecopyresampled() to copy one image into another image.

    If you just want a dot, what about using imagefilledellipse()?

  • #3
    Regular Coder sonny's Avatar
    Join Date
    Apr 2008
    Location
    United States
    Posts
    567
    Thanks
    88
    Thanked 0 Times in 0 Posts
    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.

    Sonny


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •