SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: imagecopy problem?
-
Nov 23, 2006, 07:30 #1
- Join Date
- Dec 2004
- Location
- At My Desk!!
- Posts
- 1,642
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
imagecopy problem?
Heres the problem i have, ive created a graph and now need to put a little star on each change, im trying to use the imagecopy function but cant seem to get it working, heres the code i have:
$image = imagecreatefromjpeg("my url");
$mapimage = imagecreatefromjpeg("http://www.weightloss.co.uk/images/star.jpg");
//Draw HEIGHT lines
$height_x2 = $height_x1 + $xgap;
$height_y2 = $ymax - ($row_restofid['meaHeight'] * 2.1);
imageline($image, $height_x1, $height_y1, $height_x2, $height_y2, $height_linecolor);
imagecopy($mapimage, $image, 0, 0, $height_x2, $height_y2, 10, 10);
$height_x1 = $height_x2;
$height_y1 = $height_y2;
any ideas on what i need to do?"Am I the only one doing ASP.NET in Delphi(Pascal)?"
-
Nov 23, 2006, 08:02 #2
- Join Date
- Apr 2004
- Location
- Belgian in Mexico
- Posts
- 307
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Stupid question: Does is work with another "star" image? I tried to get it to try and do what you want, but the URL for the star seems to be incorrect...
Anyway, I'll take a look at it and try with another file.
MichaëlMichaël Niessen
http://assemblysys.com
(Countries/states/cities with latitude & longitude,
weathercodes & topical databases)
-
Nov 23, 2006, 08:16 #3
- Join Date
- Apr 2004
- Location
- Belgian in Mexico
- Posts
- 307
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Ok, I tried that with other images...
The way you do it right now is that the image is copied on the star, not the other way around (in imagecopy, the first image is the destination, the second one is the source). You should usePHP Code:imagecopy($image, $mapimage, 0, 0, $height_x2, $height_y2, 10, 10);
Hope that helps,
MichaëlMichaël Niessen
http://assemblysys.com
(Countries/states/cities with latitude & longitude,
weathercodes & topical databases)
-
Nov 23, 2006, 09:46 #4
- Join Date
- Dec 2004
- Location
- At My Desk!!
- Posts
- 1,642
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ok thx very much for the help, it is true, i didnt post the whole code
. Yeh was getting a little confused which way round things went in the function, lol. Im using something else now anyways, thx for your time though
"Am I the only one doing ASP.NET in Delphi(Pascal)?"
-
Nov 23, 2006, 12:30 #5
- Join Date
- Apr 2004
- Location
- Belgian in Mexico
- Posts
- 307
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You're very welcome!
MichaëlMichaël Niessen
http://assemblysys.com
(Countries/states/cities with latitude & longitude,
weathercodes & topical databases)
Bookmarks