automatic gif formation from list of strings?

Bengt Richter bokr at oz.net
Wed Aug 7 23:14:38 EDT 2002


On Wed, 07 Aug 2002 22:24:50 -0400, Chris <h_j_fong at hotmail.com> wrote:

>
>I'd like to make 100 gifs for use as web buttons, and they would be
>named sequentially from 1900 to 1999.
>
>Seems pretty straightforward:
>specify background size and color and then font details (size, color,
>alignment), and that's all you need to iterate thru list..  
>
>Is this a good use of python somehow, or does anyone know a better
>tool (photoshop,fireworks)?  The best I can do right now is make
>1900-1909 by hand in fireworks, and then since FW uses layers and
>objects, find&replace all "190" with "191", resave, replace all "191"
>with "192", resave,  etc.  Not that bad actually (especially since I
>can batch open all 100 then and "replace" color, font, etc before
>exporting to gifs), but it seems there might be a better way to make
>matching button gifs from a list of *nonpatterned* strings.
>
To get the best font selections and effects, I'd probably use a graphic
tool like photoshop if I had it, and export matching height bitmaps for
the ten digits and a blank button to merge them onto. Then you might
use PIL or something like that to do the combinations and export them
as individual .gifs. (Actually, I'm not sure PIL does .gifs, but some
package exists to do this, I'm sure). Alternately, you might be able
just to tile together separate .gifs for digits etc in the web page.

If beautiful rendering of fonts is secondary to dynamic choices of
colors and sizes etc., you wouldn't use static bit maps for digits.

Regards,
Bengt Richter



More information about the Python-list mailing list