Fedora Linux Support Community & Resources Center
  #1  
Old 14th June 2007, 06:49 AM
lightnb Offline
Registered User
 
Join Date: Jul 2006
Posts: 127
Graphical Button Creation Automation

Is there a way to automate the creation of graphical 'buttons'? I'm working on creating buttons for a website, and repeating the same process over and over again manually is extremely tedious- especially since they are all the same, save the text on them.

I'm looking for something that can take a base image, and a pair of arguments ('button name' and 'output file name', and then it takes the specified text and centers it over the image, and saves the file to the name you specify.
__________________
Ask your doctor if Yumex is right for you.
Reply With Quote
  #2  
Old 14th June 2007, 04:01 PM
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 5,652
You should be able to do that with the gimp, using its scripting capabilities (Script-Fu). Don't ask me how, though, I've never done it.
Reply With Quote
  #3  
Old 14th June 2007, 08:57 PM
paul matthijsse Offline
Registered User
 
Join Date: Sep 2005
Location: Dieulefit, France
Posts: 721
Quote:
Originally Posted by lightnb
especially since they are all the same, save the text on them.
Hello, as those images are al the same, why not load the base image in Gimp, as RupertPupkin suggested, and just change the text part? Computers are there to automate stuff!

Cheers, Paul.
Reply With Quote
  #4  
Old 15th June 2007, 03:33 AM
lightnb Offline
Registered User
 
Join Date: Jul 2006
Posts: 127
Quote:
Originally Posted by paul matthijsse
Hello, as those images are al the same, why not load the base image in Gimp, as RupertPupkin suggested, and just change the text part? Computers are there to automate stuff!

Cheers, Paul.
How can I automate the changing of the text?

I have a list of labels (the text that goes on the button) and a list of filenames they need to be saved to.
__________________
Ask your doctor if Yumex is right for you.
Reply With Quote
  #5  
Old 15th June 2007, 03:54 AM
A.Serbinski Offline
Registered User
 
Join Date: Jul 2006
Posts: 1,123
Using graphical programs is NEVER a good way to automate procedures.

Fortunately for you, there is a GREAT program that can do EXACTLY what you are suggesting.

ImageMagick -- convert.

You might try a script along the lines of;
Code:
#!/bin/bash
convert inputfile.jpg -fill white -stroke black -font Fontname -pointsize 20 -gravity center -annotate 0 "$1" "$2"
This will take the image "inputfile.jpg", write in "Fontname" typeface with size 20 in the center of the image. It will write $1 (value of first command-line argument) text in white with a black border, and create a new file "$2" (second command-line argument).

Note:
ImageMagick will look for MS TTF fonts in the path /usr/share/fonts/default/TrueType/Fontname.ttf, so make sure that you have fonts there.

More information here: http://www.imagemagick.org/Usage/text/
Reply With Quote
  #6  
Old 15th June 2007, 02:17 PM
paul matthijsse Offline
Registered User
 
Join Date: Sep 2005
Location: Dieulefit, France
Posts: 721
don't forget to install it first:
# yum install ImageMagick
Reply With Quote
Reply

Tags
automation, button, creation, graphical

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
F8 keyring automation in KDE? Frank616 Installation, Upgrades and Live Media 5 22nd December 2007 09:11 AM
Batch Automation/Scripts in GIMP Logik Using Fedora 3 14th December 2007 12:38 AM
Automation of modprobe/dhclient mijokijo Using Fedora 0 19th June 2005 04:03 AM
Nvidia graphics automation jameson Using Fedora 8 24th August 2004 06:58 AM


Current GMT-time: 07:33 (Wednesday, 17-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat