Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Dynamic Image?

    Who knows how this is done:

    [url]http://www.danasoft.com/vipersig.jpg[/url]

    As you can see the signature is dynamical, it uses gdlib I assume and php.
    But does anybody have any code for this? Please help me find this, I
    allready searched alot, but can't seem to find anything yet...

    Regards, Cybex


    Cybex Guest

  2. Similar Questions and Discussions

    1. dynamic image gallery
      I'm trying to create a dynamic image gallery that is updated from a database, i managed to create a simple mysql database using phpmy admin, so I...
    2. dynamic image
      hey everyone just a quick and probably stupid question here. i have a list of features in my access database that are related to my products. i...
    3. Dynamic Image Map (ASP)
      Like most product websites all our product info pages are populated using a database and ASP. Now one of the dynamically generated content is an...
    4. dynamic image map
      Based on certain variable in a javascript, can I somehow hide an image map? I can't seem to be able to target the map.....any thoughts? Thanks ,,...
    5. Dynamic image that can be emailed?
      I want to create something on my website that allows the user to arrange image pieces (sort of like a puzzle) and then email the final result to...
  3. #2

    Default Re: Dynamic Image?

    Cybex wrote:
    >
    > Who knows how this is done:
    >
    > [url]http://www.danasoft.com/vipersig.jpg[/url]
    >
    > As you can see the signature is dynamical, it uses gdlib I assume and php.
    > But does anybody have any code for this? Please help me find this, I
    > allready searched alot, but can't seem to find anything yet...
    >
    > Regards, Cybex
    ImageMagick would work well for this, if it's installed on your server.
    If you have Telnet or SSH:
    whereis ImageMagick
    will tell you where it is.

    Shawn
    --
    Shawn Wilson
    [email]shawn@glassgiant.com[/email]
    [url]http://www.glassgiant.com[/url]
    Shawn Wilson Guest

  4. #3

    Default Re: Dynamic Image?


    "Cybex" <cybex.Ihatespam@home.nl> wrote in message
    news:biijn1$887$1@news1.tilbu1.nb.home.nl...
    > Who knows how this is done:
    >
    > [url]http://www.danasoft.com/vipersig.jpg[/url]
    >
    > As you can see the signature is dynamical, it uses gdlib I assume and php.
    > But does anybody have any code for this? Please help me find this, I
    > allready searched alot, but can't seem to find anything yet...
    PHP to generate a horizontal bar graphic in a PNG file when called with a
    URL parameter 'precent'

    makepng.php
    <?php
    // read url parameter 'percent'
    $percent=$_GET["percent"];
    // calculate size of bar
    $x1=floor(460*($percent/100));

    // build image
    $im = ImageCreate(500, 50);

    // set colours, first colour created is background
    $black = ImageColorAllocate($im, 0, 0, 0);
    $white = ImageColorAllocate($im, 255, 255, 255);
    $red = ImageColorAllocate($im, 255, 0, 0);

    // set up array defining vertices of hexagonal bar, width depends on
    'percent' parameter
    $points=array(10,25,20,45,($x1+20),45,($x1+30),25, ($x1+20),5,20,5);

    // draw polygon using array 'points' and colour red
    imagefilledpolygon($im,$points,6,$red);

    // write text on top of bar
    imagestring($im,5,20,20,$percent.'%',$white);

    // send the image to the browser
    header("Content-type: image/png");
    ImagePNG($im);

    // tidy up
    ImageDestroy($im);
    ?>

    and an example of a page using the above code

    <html>
    <head>
    <title>dynamic image</title>
    <script type="text/javascript">
    function graph(gaugeID)
    {
    var n=20;
    var time=new Date();
    var n=time.getSeconds();
    n=Math.floor((n*100)/60);

    document.getElementById(gaugeID).src='makepng.php? percent='+n;
    var temp=setTimeout("VUgauge('gauge1')",1000);
    }
    </script>
    </head>
    <body onload="graph('placeholder');">
    <img id="placeholder">
    </body>
    </html>
    > Regards, Cybex
    >
    >

    Richard Hockey Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139