Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-27-2012, 07:53 AM   PM User | #1
sonny
Regular Coder

 
sonny's Avatar
 
Join Date: Apr 2008
Location: United States
Posts: 567
Thanks: 88
Thanked 0 Times in 0 Posts
sonny can only hope to improve
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
sonny is offline   Reply With Quote
Old 02-27-2012, 11:51 AM   PM User | #2
KuriosJon
Regular Coder

 
Join Date: Jan 2012
Posts: 134
Thanks: 0
Thanked 32 Times in 32 Posts
KuriosJon is on a distinguished road
You can use imagecopyresampled() to copy one image into another image.

If you just want a dot, what about using imagefilledellipse()?
__________________
Roundabout Time Tracking
KuriosJon is offline   Reply With Quote
Old 02-27-2012, 06:42 PM   PM User | #3
sonny
Regular Coder

 
sonny's Avatar
 
Join Date: Apr 2008
Location: United States
Posts: 567
Thanks: 88
Thanked 0 Times in 0 Posts
sonny can only hope to improve
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
sonny is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:22 PM.


Advertisement
Log in to turn off these ads.