Quick question for those who are familiar with GD and PHP.

Just wondering if GD can make images based on HTML attributes ... best to show an example to explain better.

Example:
(Say I have the following HTML)

<font color="FF0000">Hello World!</font>

can, (or is there away) GD create that image based on its HTML attribute ... Hello World written in Red

basically, I have a WYSIWYG online editor for choosing fonts, colors, etc .... when its submitted, I'm wondering if GD can create the image as like it was in the editor ... with the color changes of the fonts, bold, etc ...

hope I explained that correctly ...

thanks

    No.. GD cannot parse HTML and create images out of it, unless you make the system yourself, which could be easily made if you only want color, bold, italic, underline.

      Basically, what I want to do is this:

      In an online text editor, similar to the one used here in vbulletin ...

      I edit my text

      Title

      Sub Title

      Body

      now, when I submit, I want the image to represent what I had, with diffrent portions of the text diffrent colors, size, etc.

      I've been looking at alot of the GQ functions, and it appears that if you choose a color, it writes all the text as that color, etc ... is it possible to have text generated as an image but with diffrent attributes of each .. like the first line red, second blue - bold, then some text black.

      I haven't found any examples of such a settup yet .. wondering if its possible.

      thanks again for the feedback

        You can't tell the GD to do this:

        image_html_parse("<font>...</font> etc");

        You would have to make your own function that would parse the HTML and figure out where to make the text color etc..

          Write a Reply...