Dynamic Image Editing?

martinatkinson

Registered
Hey guys!

I have a tough question. I am making a site and I would like to have a CGI script or whatever is needed to be able to dynamically edit the content of an image.

OK, I have the button and what I would like to do is access:

http://www.MYSITE.com/images/MYIMAGE.png?text=My Button Text

When this URL is accessed it would display the button with the text "My Button Text" or whatever was typed in place of that.

I have seen this done on other sites does anyone here know how I would do this or could provide me a link to a script that would allow this?

Thanks!

Albert
 
It isn't that hard if you already know php which isn't that hard if you already know perl. If you're feeling full of beans a good place to start would be here and here. If a printed manual is more your style, there is a chapter on generating graphics in Visual Quickpro Advanced PHP. The main hurdle is fonts, if you install Xfree86 & such you should be able to access those fonts as described on the php site, but incorporating the Mac fonts is a problem I haven't had the time to confront (a ten foot pole that nobody seems quite ready to touch).
 
Hello!

I am writing this post on a Dell right now and that image showed up fine. Looks like what I want, problem is that when I tried to access it using Internet Explorer 5.1 for my Mac it did not know how to handle it, any idea why? Also, if I did
PHP:
<img src="http://www.entropy.ch/software/macosx/php/button-image.php?%20text=Home"><br><br><img src="http://www.entropy.ch/software/macosx/php/button-image.php?%20text=About Us">
would this work?

Have a great day!

Albert
 
Could it be a png thing? Since php uses open source libraries to generate images, the gif file format was abandoned becase of LZW patent issues. The image works just fine for me in X, but I've read that some people have problems viewing png files.
 
In the source file, change the code reading:
PHP:
# That's it, output the result
#
header("Content-Type: image/png");
ImagePng($img_out);
So that the last two lines of that clipping are
PHP:
header("Content-Type: image/jpeg");
ImageJPEG($img_out);
or
PHP:
header("Content-Type: image/gif");
ImageGIF($img_out);
Which produces a JPEG or a GIF image respectively.

Bernie :eek:)
 
Someone was asking why they could not view the PNG on IE for the mac, just go to Preferences - File Helpers and customize the PNG options, at the bottom select: Handling view with browser.

That was a simple answer for a irritating problem!
iolaire
 
Back
Top