• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Graphical text via CGI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Graphical text via CGI


  • Subject: Re: Graphical text via CGI
  • From: Daniel Shockley <email@hidden>
  • Date: Mon, 5 Mar 2001 13:52:05 -0800 (PST)

> Date: Sun, 4 Mar 2001 11:39:47 -0400
> To: email@hidden
> From: John MacDonald <email@hidden>
> Subject: Graphical text via CGI
>
> I want to render text from a web page into styled graphics and I want
> to do it on demand via CGI.

Use clip2gif, which you can get at http://homepage.mac.com/piguet/gif.html

Here's some modified sample code from PeachPit Press's book, Applescript for the Internet: Visual
Quickstart guide. (I think it's safe to post a piece of it, since you can download the code from
their website without a password.)
---------- BEGIN SCRIPT -----------
set myFolder to (choose folder with prompt "Select folder to save image:")
set useThisText to text returned of display dialog "What should it say?" default answer "Type in
your text here"
tell application "clip2gif"
save {200, 100} in window drawing ,
{{drawn text:useThisText, position:{0, 0, 200, 100}, font:"Helvetica", justification:center,
style:{bold, italic}, size:20, color:{65535, 0, 0}}}
save window 1 as GIF in file (myFolder & "text.gif" as text) scale 50 depth 8 with dithering
without transparency
close window 1
end tell
---------- END OF SCRIPT -----------

You can specify all kinds of properties of the text. clip2gif is pretty amazing, and it's
completely free. Yves Piguet also has a program there called GifBuilder, which lets you create
animated gifs - also using AppleScript. I've read good things about both of them, although I
haven't had much occasion to use them myself - I stopped running my web site on my own Mac back in
1995.

Enjoy!


=====
Daniel A. Shockley
email@hidden
http://www.danshockley.com
http://www.krioni.com

And now for a message from my sponsor... *grin*
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/


  • Follow-Ups:
    • Re: Graphical text via CGI
      • From: Sander Tekelenburg <email@hidden>
  • Prev by Date: Re: Folder action script tutorials?
  • Next by Date: Re: Folder action script tutorials?
  • Previous by thread: Re: Graphical text via CGI
  • Next by thread: Re: Graphical text via CGI
  • Index(es):
    • Date
    • Thread