Create 100+ Buttons from Text-Database

AS
Posted By
Adrian Schmitt
Sep 25, 2006
Views
194
Replies
3
Status
Closed
Hi,

I have a database with more than 100 text-entries (and they keep changing) and I would like to generate buttones from an existing empty jpg-button with the texts printed centered on them and named the files according to the text-entries.

How can I e.g. import lines from a text-file and print each line on the button-template and save it under the according name? I know something about ps-batch-programming but not how to handle the text-issue. I have found quite a lot buttonmaker-tools or photoshop tutorials, but not with this functionality.

If not possible in photoshop I would be very interested in a free windows tool for the same functionality. (Printing text from a list onto a graphical button template and name the resulting image-files accordingly)

Any help is highly appreciated
Thank You 🙂
Adrian

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

K
Kingdom
Sep 25, 2006
"Adrian Schmitt" wrote in
news::

Hi,

I have a database with more than 100 text-entries (and they keep changing) and I would like to generate buttones from an existing empty jpg-button with the texts printed centered on them and named the files according to the text-entries.

How can I e.g. import lines from a text-file and print each line on
the
button-template and save it under the according name? I know something about ps-batch-programming but not how to handle the text-issue. I
have
found quite a lot buttonmaker-tools or photoshop tutorials, but not with this functionality.

If not possible in photoshop I would be very interested in a free windows tool for the same functionality. (Printing text from a list onto a graphical button template and name the resulting image-files accordingly)

Any help is highly appreciated
Thank You 🙂
Adrian

Its very probably possible using scripts but you will need to investigate further unless anyone here has more script info.

here is a starter
http://www.photoshopsupport.com/tutorials/jennifer/photoshop – scripts.html


———————————————————— ———— Learning is not attained by chance, it must be sought for with ardor and attended to with diligence.
———————————————————— ————
J
j
Sep 26, 2006
Adrian Schmitt wrote:
Hi,

I have a database with more than 100 text-entries (and they keep changing) and I would like to generate buttones from an existing empty jpg-button with the texts printed centered on them and named the files according to the text-entries.

That’s something Photoshop CS2 does, and so does earlier versions of ImageReady. Look into Data-Driven graphics.

I put up a couple posts about it here last year.
AS
Adrian Schmitt
Oct 18, 2006
Adrian Schmitt wrote:
Hi,

I have a database with more than 100 text-entries (and they keep changing) and I would like to generate buttones from an existing empty jpg-button with the texts printed centered on them and named the files

Thank you for the answers, "Kingdom" and "j". In the end I gave up and solved it on the web server.

The buttons are now generated with a php library that loads the empty image live and writes the text centered onto it each time a button graphics is requested.

In case anyone is interested, this is my livebutton.php:

<?
header("Content-type: image/png");
$t = $_GET[‘text_for_button’];
$slen = strlen($t);
$im = imagecreatefrompng("empty.png");
$textcolor = imagecolorallocate($im, 9, 39, 111);
$font = 3;
$pxd = 6;
$px = $pxd + (imagesx($im) – (7.5 * $slen)) / 2;
$py = 7;
imagestring($im, $font, $px, $py, $t, $textcolor);
imagepng($im);
imagedestroy($im);
?>

Images are defined like this in html now:

< img src = " livebutton.php?text_for_button=Home " >

(The example may contain errors but it works this way or similar)

Cheers
Adrian

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

Related Discussion Topics

Nice and short text about related topics in discussion sections