question about scripts (maybe)

S
Posted By
Spoofy
Jun 24, 2006
Views
281
Replies
4
Status
Closed
Hi, I’m a total PS newbie, so, please, be nice… 🙂

They have told me PS gives you the chance to do by scripting some tedious tasks.

What I need to do is the following:
– create 256 jpg images of the same size;
– each image is composed by:
1) a unique background color;
2) a unique number written upon the background;

Is this possibile?
How? Can anybody help me?

Regards, S.

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

2
2
Jun 24, 2006
"Spoofy" wrote in message
Hi, I’m a total PS newbie, so, please, be nice… 🙂

They have told me PS gives you the chance to do by scripting some tedious tasks.

What I need to do is the following:
– create 256 jpg images of the same size;
– each image is composed by:
1) a unique background color;
2) a unique number written upon the background;

Is this possibile?

I am not a newbie, and I consider that an interesting challenge.

Writing the number on each is simple. We can get to that in a second.

But first: How is each background color determined? That is, do you have the HEX (octal, binary, integer, whatever) codes for them?
S
Spoofy
Jun 24, 2006
2 ha scritto:

But first: How is each background color determined? That is, do you have the HEX (octal, binary, integer, whatever) codes for them?

Hi, thanks for replying.
The background color can be the websafe palette too.
Anyway, it is more important the unique filename/number than the unique background.

Regards, S.
2
2
Jun 25, 2006
"Spoofy" wrote:

The background color can be the websafe palette too.
Anyway, it is more important the unique filename/number than the unique background.

Here’s the trick I posted a couple years ago, a simple way that works if you want to do it without scripting.

First, load up the list of names into something like Excel, or use Notebook, Word, whatever you like and insert :"X," as the first, then a comma between each name. In this case, it would be numbers from 1 to 256. (Excel will do this automatically for you under the ‘fill’, then ‘series’ option.)

Then save that file as comma delimited.

Now…
Open ImageReady (it comes with Photoshop).
Open the image you want to fill in with the names.
Create a new layer.
Type "X" in it with the text centered or justifed, whatever. (This X will be replaced.)

Then right-click on that layer – to the right of the icon. (there are two right-click options. You must click to the right of the icon.) Take the Variables option.
In the first window, click on the lower option for [X] Text Replacement Then type the word X in the text box
press the NEXT button
Then in the window that shows next, press IMPORT
find the file you just created and press Open

To be safe, now save the file.

Finally, under the menu File – Export – Data Sets as Files press OKAY

Wait a couple minutes and you will have the photoshop images, each with a single text layer containing the name .

(In the last dialog – Export – you can change the naming convention to what you like. It doesn’t change the contents of the image. You can also use CS’s Browser to rename the files afterwards and batch the whole group of images to JPEG or GIF if you like. Alternatively, there’s a free Droplet in Photoshop’s "Samples" folder that will do this. Just drag it into the folder, then drag all your files onto it.)

How’s that for working around scripting? 🙂
S
Spoofy
Jun 25, 2006
"Spoofy" wrote:

The background color can be the websafe palette too.
Anyway, it is more important the unique filename/number than the unique background.

Here’s the trick I posted a couple years ago, a simple way that works if you want to do it without scripting.

First, load up the list of names into something like Excel, or use Notebook, Word, whatever you like and insert :"X," as the first, then a comma between each name. In this case, it would be numbers from 1 to 256. (Excel will do this automatically for you under the ‘fill’, then ‘series’ option.)
Then save that file as comma delimited.

I made it in a moment this way (Flash):

arr = ["X"];
for (i=1; i<257; i++) {
arr.push(i);
}
trace(arr);

Now…
Open ImageReady (it comes with Photoshop).
Open the image you want to fill in with the names.
Create a new layer.
Type "X" in it with the text centered or justifed, whatever. (This X will be replaced.)

stop! 🙂
It seems I can’t do this…
PS 6, IR 3. Is it possible?

Regards, S.

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.

Related Discussion Topics

Nice and short text about related topics in discussion sections