[PHP] Graduated fills using PHP Images

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

  1. #1

    Default [PHP] Graduated fills using PHP Images

    Hi all!

    Is it possible to have PHP creates an image that graduates 1 color to
    another, such as create and images 100 pixels wide and in height which
    fades red to green top to bottom?

    Any help or suggestions would be really helpful.

    Thanks

    Adrian
    [email]php@stormbreaker.com[/email]



    Adrian Guest

  2. Similar Questions and Discussions

    1. I would like to simulate depth of field with graduated gaussen blur
      Is there a way to use the gradient tool and gaussen blur to create a mild to strong blur similar to a close up photo with a camera lens opened up to...
    2. Image with graduated fill using PHP
      Hi all! Is it possible to have PHP creates an image that graduates 1 color to another, such as create and images 100 pixels wide and in height...
    3. Graduated Neutral Density
      What is the best and most effective way, using Elements 2.0, to achieve an image effect similar to that when using a graduated neutral density filter...
    4. circular graduated neutral density filter
      Hello, This was originally posted in rec.photo.digital last week, but was quickly buried in the incoming mail. I have a digital camera, so this...
    5. circular graduated neutral density filters
      Hello, I'm thinging about buying a cheap ($16) circular graduated neutral density filter. I've been reading about them, and wanted to buy the...
  3. #2

    Default RE: [PHP] Graduated fills using PHP Images

    [snip]
    Is it possible to have PHP creates an image that graduates 1 color to
    another, such as create and images 100 pixels wide and in height which
    fades red to green top to bottom?
    [/snip]

    [url]http://us3.php.net/image[/url]

    You could set the color index and the loop through (while incrementing)
    each new index. Seems awfully intensive though. I know that jpgraph
    ([url]http://www.aditus.nu/jpgraph/[/url]) can use gradiated backgrounds for some
    of its output...perhaps you could look at the code included with the
    class

    HTH!
    Jay Blanchard Guest

  4. #3

    Default Re: [PHP] Graduated fills using PHP Images

    At 2003-08-15 08:14 -0400, Adrian wrote:
    >Is it possible to have PHP creates an image that graduates 1 color to
    >another, such as create and images 100 pixels wide and in height which
    >fades red to green top to bottom?
    It's possible. I have just been experimenting with
    it using ImageCreateTrueColor().

    See the manual:
    [url]http://www.php.net/manual/en/function.imagecreatetruecolor.php[/url]

    You still have to use ImageColorAllocate() to get
    a color but you can deallocate it right after usage
    and you can use as many colors as you like (whereas
    with normal 256 color images you can't use more
    than 256). The process didn't noticably slow my
    1 Ghz PC down.

    I made some nice fades in two directions too:
    [url]http://www.chipdir.nl/adprov/adb/cdb/468_60/08en.png[/url]

    BTW. I made it look like the upper text has been pressed
    downward into the material and the lower text has been
    pressed upward out of the material. (Using alpha
    channel coloring.)

    Let me know if you want to see the source code...



    Jaap Van Ganswijk 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