GD with php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • timlitw@gmail.com

    GD with php

    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?

  • Janwillem Borleffs

    #2
    Re: GD with php

    timlitw@gmail.c om 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:



    The source also contains URLs to a demo application.


    JW


    Comment

    • timlitw@gmail.com

      #3
      Re: GD with php


      Janwillem Borleffs wrote:
      timlitw@gmail.c om 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:
      >

      >
      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


      but I think with a few modification this example will get me further.

      Comment

      • timlitw@gmail.com

        #4
        Re: GD with php


        timlitw@gmail.c om wrote:
        Janwillem Borleffs wrote:
        timlitw@gmail.c om 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:



        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

        >
        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


        Comment

        • Geoff Berrow

          #5
          Re: GD with php

          Message-ID: <1151819563.790 025.269390@75g2 000cwc.googlegr oups.comfrom
          timlitw@gmail.c om 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/

          Comment

          • timlitw@gmail.com

            #6
            Re: GD with php


            Geoff Berrow wrote:
            Message-ID: <1151819563.790 025.269390@75g2 000cwc.googlegr oups.comfrom
            timlitw@gmail.c om 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?

            Comment

            • Geoff Berrow

              #7
              Re: GD with php

              Message-ID: <1151866129.908 244.297340@p79g 2000cwp.googleg roups.comfrom
              timlitw@gmail.c om 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/

              Comment

              • Krustov

                #8
                Re: GD with php

                <comp.lang.ph p>
                <timlitw@gmail. com>
                <2 Jul 2006 11:48:49 -0700>
                <1151866129.908 244.297340@p79g 2000cwp.googleg roups.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="imag es/demo.jpg";
                if (!file_exists($ filename)) {$pass=0;}
                if ($pass==0) {include('creat e_map_image.php ');}

                If a image isnt found then $pass will equal 0


                --

                Comment

                • timlitw@gmail.com

                  #9
                  Re: GD with php


                  Krustov wrote:
                  >
                  $pass=1;
                  $filename="imag es/demo.jpg";
                  if (!file_exists($ filename)) {$pass=0;}
                  if ($pass==0) {include('creat e_map_image.php ');}
                  >
                  If a image isnt found then $pass will equal 0

                  Thank you everyone for the help!

                  Comment

                  • timlitw@gmail.com

                    #10
                    Re: GD with php

                    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?

                    Comment

                    Working...