This is a discussion on GD with php within the PHP Language forums, part of the PHP Programming Forums category; I am trying to use gd to make a wind direction compass. Is is possbile to merge the picture of ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
timlitw@gmail.com wrote:
> I am trying to use gd to make a wind direction compass. > > Is is possbile to merge the picture of the compass with the picture of > the compass needle rotateing the needle as needed ofr each rendering? > Yep, example source can be found here: http://playground.jwscripts.com/imagerotate.phps The source also contains URLs to a demo application. JW |
|
|||
|
Janwillem Borleffs wrote: > timlitw@gmail.com wrote: > > I am trying to use gd to make a wind direction compass. > > > > Is is possbile to merge the picture of the compass with the picture of > > the compass needle rotateing the needle as needed ofr each rendering? > > > > Yep, example source can be found here: > > http://playground.jwscripts.com/imagerotate.phps > > The source also contains URLs to a demo application. > > > JW Thanks very much for that. I had found a clock and modified that - and got this far http://www.qffinc.com/scripts/compass.php?windir=300 but I think with a few modification this example will get me further. |
|
|||
|
timlitw@gmail.com wrote: > Janwillem Borleffs wrote: > > timlitw@gmail.com wrote: > > > I am trying to use gd to make a wind direction compass. > > > > > > Is is possbile to merge the picture of the compass with the picture of > > > the compass needle rotateing the needle as needed ofr each rendering? > > > > > > > Yep, example source can be found here: > > > > http://playground.jwscripts.com/imagerotate.phps > > > > The source also contains URLs to a demo application. > > > > > > JW > > Thanks very much for that. I had found a clock and modified that - and > got this far > http://www.qffinc.com/scripts/compass.php?windir=300 > > but I think with a few modification this example will get me further. It still needs some work - rotateing the pointer for nne ne and ene ofr example leave artifacts. you can see it here http://www.qffinc.com/weather/hillsboro/test.php |
|
|||
|
Message-ID: <1151819563.790025.269390@75g2000cwc.googlegroups. com> from
timlitw@gmail.com contained the following: >It still needs some work - rotateing the pointer for nne ne and ene ofr >example leave artifacts. you can see it here >http://www.qffinc.com/weather/hillsboro/test.php Give your server a break. Each time you generate and image, store it. then check if the image exists before generating a new one. Eventually you will have 360 images and won't need to create any more. Or just write a loop to generate 360 images in one go. Though to be honest, I doubt you can measure wind direction to an accuracy of one degree anyway. A display to the nearest 5 degrees would probably do just as well. -- Geoff Berrow (put thecat out to email) It's only Usenet, no one dies. My opinions, not the committee's, mine. Simple RFDs http://www.ckdog.co.uk/rfdmaker/ |
|
|||
|
Geoff Berrow wrote: > Message-ID: <1151819563.790025.269390@75g2000cwc.googlegroups. com> from > timlitw@gmail.com contained the following: > > >It still needs some work - rotateing the pointer for nne ne and ene ofr > >example leave artifacts. you can see it here > >http://www.qffinc.com/weather/hillsboro/test.php > > > Give your server a break. Each time you generate and image, store it. > then check if the image exists before generating a new one. Eventually > you will have 360 images and won't need to create any more. Or just > write a loop to generate 360 images in one go. > > Though to be honest, I doubt you can measure wind direction to an > accuracy of one degree anyway. A display to the nearest 5 degrees would > probably do just as well. > -- > Geoff Berrow (put thecat out to email) > It's only Usenet, no one dies. > My opinions, not the committee's, mine. > Simple RFDs http://www.ckdog.co.uk/rfdmaker/ actually , n, nne, ne, ene, e, ese, se, sse, s ssw, sw, wsw, w wnw, nw, nnw are all that are really needed. We don't actually have to be more acurate than that. So how do I check if I already have the image ot not? |
|
|||
|
Message-ID: <1151866129.908244.297340@p79g2000cwp.googlegroups .com> from
timlitw@gmail.com contained the following: >actually , n, nne, ne, ene, e, ese, se, sse, s ssw, sw, wsw, w wnw, nw, >nnw are all that are really needed. We don't actually have to be more >acurate than that. > >So how do I check if I already have the image ot not? file_exists() But for just sixteen images, I'd simply create them in a paint program. -- Geoff Berrow (put thecat out to email) It's only Usenet, no one dies. My opinions, not the committee's, mine. Simple RFDs http://www.ckdog.co.uk/rfdmaker/ |
|
|||
|
<comp.lang.php>
<timlitw@gmail.com> <2 Jul 2006 11:48:49 -0700> <1151866129.908244.297340@p79g2000cwp.googlegroups .com> > actually , n, nne, ne, ene, e, ese, se, sse, s ssw, sw, wsw, w wnw, nw, > nnw are all that are really needed. We don't actually have to be more > acurate than that. > > So how do I check if I already have the image ot not? > $pass=1; $filename="images/demo.jpg"; if (!file_exists($filename)) {$pass=0;} if ($pass==0) {include('create_map_image.php');} If a image isnt found then $pass will equal 0 -- www.emailuser.co.uk/?name=KRUSTOV |
|
|||
|
Now I need to add, high and low hands to my gauges.
When I duplicate the code the writes the hand it still doesn't get in the final image. I'm guessing that I need to increment the temporary image that I am working with as I add layers. Does any one have an example of adding 2 or 3 layers on top of an image? |