• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Under deadline and need script help in photoshop

Community Beginner ,
Jan 21, 2017 Jan 21, 2017

Copy link to clipboard

Copied

Hi,

I'm building an animated eBlast that needs to go out this week to 1800 recipients. While I have been trying to learn to scripting in Photoshop, I'm not there yet. I've used XMPie to build 1800 personalized .jpg files and I've built the action in PS to turn them all into animated .gifs. I'm now trying to build a script to automate the process of opening each .jpg and running the action and upon completion saving the animated .gif in the same order as the .jpg folder in a new folder but I'm really lost and will not make my deadline. I'm on a Mac using CC15 and trying to do this in ExtendScript Toolkit. Any help will be truly appreciated!

TOPICS
Actions and scripting

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 24, 2017 Jan 24, 2017

alc89190465 wrote:

JJ,

It would help immensely if I could see what is in your LoadAndAnimate action. Then, what are the contents of the CreateAnimatedGif Batch folder - C:\........|OutputFolder?

It all in the screen capture. Load and animate is not used that is why it not expanded.  It the other three actions that does it. The top one it the one you record last and is the action the actually does that dose the job. The action does two batches.  It batches the jpeg into PSD file containing the frame

...

Votes

Translate

Translate
Adobe
Enthusiast ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

What doesn't work for you?

can you be more specific

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

Actually a simple Action the uses an Adobe script may work for you if all the image are the same size and in a folder. I just recorded one.

Load Files into a stack (will be and interactive step you need to select the source image folder then click OK.)

Create Frame animation

Make Frames from layers

Set animation to loop forever

Export Save for Web and animated Gif to the desktop.

Close No Save.

I ran it it went like this.

Capture.jpg

AnimatedGif.gif

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

JJMack,

I've done all the necessary work in Photoshop, the action is created, it's the "script" that I don't know how to write. Here is an example of what I'm looking to do. I need to swap out the first name in 1800 files. They are all the same size .jpgs. This is one file that I've done manuallytestgif.gif

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

You do not write it. It come with Photoshop menu File>Scripts>Load Files into  Stack

Capture.jpg

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

I have not tested this, however my first thought would have been to explore a batch action, Image Processor or Image Processor Pro before looking into scripting. If it is just a case of cycling through a folder of input files and running a predefined action and then saving. What am I missing?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

Thank you all for your patience. Let me go into a little more detail and see if you still think batch action will work in this case.

In creating this action I have to start with a blank chalkboard, so I open this file -

cookbase.jpg1633.jpg

Now, I have a folder with 1800 .jpg files that were created in XMPie having input the <first name> already onto the chalkboard. (ie. .jpg1 - Al, .jpg2 - Ken, .jpg3 - Charlie, and so on.

So how do I make an action that pulls the first file in this folder into the next layer, and then tween 30 frames of animation with opacity to go from a blank chalkboard to revealing the name as shown in the animated .gif in my last post, then export the file as an animated .gif and repeat this process using the second file, then the third file and so on? How does the action know to pull in these successive files.

I'm blind on this

Thanks, Al

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

I think that I was having problems following your first post that was more stream of consciousness than concise step by step. :]

I’ll get back to you after more thorough testing. Unless I have a “lightbulb” moment and I am missing something not initially obvious to me, It sounds like you have done the hard part.

BTW: If you didn't know, Photoshop has it’s own variable text engine, so the names can also be done directly in Photoshop, however this would not have helped with the animation as it would just create the static files.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

Yes I know about variable text in PS but as you said, it wouldn't do the trick for me either. I use XMPie because we do a lot of things with image fonts - so it's been my go to. Thanks for your help though!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

If your image are like the two you posted I was able to record an action to do the job.

The truth is actually three action.   Two of the actions were for a batch process. I tried to do it as one batch process but could not for though I was able to create the frame animation when I had the Image Processor Pro save Gif file with it save for web option. It saved flat Gif file not animated gif files.  So I have it save PSD file with the frame animations.  Then I created an action batch to export the animated gif file and close the document no save.  After recording the two actions to be batched.  The one that creates the frame animation PSD and the one to export frame animation to an animated gif I recorded the third action toe for the two batches.  The Images Processor Pro script is a Photoshop Plug-in and can record the setting you used recording the action into the action step. No dialog is displayed when you plat the action the recorded settings are used,  The Image Processor step that recorded look like an empty step in the recorded action burr all the info has been. The Action First step is the Image Processor Pro step the second step the automat batch step.  I batched just two images. You may need to click on them to see then animate I did not loop them.

Capture.jpg1633.gif1634.gif

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

Excellent JJ! I thought this would be possible without custom scripting, however I have not yet had time to play.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

Al, I had a quick play (but not exhaustive) and had a similar but slightly different setup to JJMack.

1st Batch Action

File > Place (place the blank chalkboard file)

File > Save As: Photoshop PSD with layers, however this step could probably be removed and Image Processor or Image Processor Pro used instead

Run this against the folder containing the 1800 JPEG files

Once all of the 1800 PSD are saved…

2nd Batch Action

Select layer background

Promote to layer (double click)

Move current layer to next layer or move current layer to front

Then the steps to create the animation that you have created

Then run the batch action using this action to create the animated GIF files from the PSD files.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

It is relatively easy to eliminate the IPP and do it with a single batch script. The script juste needs toe open the Jpeg file in an image input folder. When a jpeg file is opened into a document do action 1 that creates the frame animation then do action  2 that does the export save for web to output the animated gif file.   The Actions could be made part of the scrip by converting the actions to action manager code using xtools and replace the two do action statement in the script with the action manager code,  All code would be in that single script. Only 3600 files will be use as input and 1800 gif written.  You could instead replace the Place step with a copy in or pasted in the blank blackboard the scrip opens once as a second open document open once an use 1800 times  so only 1801 files will be opened and 1800 files written our.

Using the IPP and Batch 5,400 images files will be opened and 3600 image files will be written. Instead of reading 1801 file and writing 1800 file. it will run fasted. It will take some time to program the script.. As a hacker it would take me a long time for I do not type or know javascript.  I would rather drink wine while IPP and Batch does it the long winded easy way.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

JJ,

You did it for me, your hard work and passion to find the answers became a so much needed light in my tunnel!!!!!   Job done and out the door..... Yahooo!

But I still have one nagging question.................What is your wine preference? Red, White, - Cabernet, Pinot Grigio.........I must know

I can't put this puppy to bed until I have a glass of your Favorite Vintage (If I can afford it) so I can toast to you and the fine members on this forum who so willingly give of themselves to have built and nurtured this outstanding community of "people helping people".

Carry on my good friend, hope to speak with you soon... Al

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

Stephen,

Thanks so much for chipping in on my little dilemma. You guys are so great in putting aside your precious time to help people who haven't quite gotten to your level of expertise yet! JJ's fix did it for me before I saw your post. I haven't had time to try your solution, although looking at it, it seems quite similar. When I get some free time I'll give it a go and see what the differences are - but I'm sure the differences in the workflow are probably very minimal and I'm sure both solutions would  have "gotten me home". I have to tell you though, what a relief it is to have this problem solved, the job out the door, and now I'm able to move on and get myself into much deeper troubles !! - And, you did help me and I truly appreciate that!

Take care my friend and hope to see you around the forums, Al

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 26, 2017 Jan 26, 2017

Copy link to clipboard

Copied

LATEST

Hi Al, I’m glad to be of some small help. Unlike InDesign or Illustrator, we are lucky with what we can do in Photoshop with the available automation tools. It is common for many end users to think that they need custom scripting, when actions/batch actions or the Image Processor or Image Processor Pro script will get the job done. Yes, there are always more elegant ways of doing things and I am all for best practices – however I am also pragmatic. There are of course times when things can only be done via a script. As I can’t script (sometimes I can hack them though), it can be hard to have to be at the mercy of others good will, hoping that somebody can help or write a script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

JJ,

Thank you for spending your precious time to try to help me out here!

I have downloaded the plug-in IPP and have tried to recreate exactly what you had done, step by step, but I'm not getting the same results :{

It would help immensely if I could see what is in your LoadAndAnimate action. Then, what are the contents of the CreateAnimatedGif Batch folder - C:\........|OutputFolder?

I suspect my troubles lie within these parameters

Also I noticed in the second animated .gif, - well it appears that file has had the name "Al", from the previous file, manually erased from the chalkboard up top, and this is further confusing me.

Again, thank you for your time and patience!

Al

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

alc89190465 wrote:

JJ,

It would help immensely if I could see what is in your LoadAndAnimate action. Then, what are the contents of the CreateAnimatedGif Batch folder - C:\........|OutputFolder?

It all in the screen capture. Load and animate is not used that is why it not expanded.  It the other three actions that does it. The top one it the one you record last and is the action the actually does that dose the job. The action does two batches.  It batches the jpeg into PSD file containing the frame animation.  Then it batches the PSD file and exports the animated gif files.  I used three folders. I would recommend the you use four.  You need two folders toe hold your Jpeg images. One contains your 1800 jpeg with the names on the blackboard. The other folder contains you empty blackboard image.  I use a single output folder its was also the input folder for the batch process the outputs the animated gif.  So in my screen captures you see it used as the input folder for the automate batch job it was empty but the ipp batch stored the PSD files into the folder.  The export save for web saved the gif there. It is important when you record the action you only set the output folder in the export save for web step. I expanded the export save for web step so you could see only the output folder is recorded into the step there is no filename recorded you want Photoshop to use the default name the current document name. You do not want to keep saving the same output file and wind up with a singe gif with 30 frames.   So use four folders.

Do as I did test with two image files abd rge empty blackboard image. Record the action the creates the Frame animation first.

Open an image with the name on the blackboard. 

The record the action FadeInName

step1 Place in the blank blackboard image accept the default placement it should be perfectly aligned with the background.

step 2 In the timeline palette click the Create frame animation button. the will create the first frame.

step 3 Drag that first frame to the new frame icon in the timeline frame animation palette to duplicate the frame.

step 4 The duplicate frame is now the target so set the top layer opacity to 0

step 5 Target the two frames and use the frame animation palette fly-out menu item tween an set 28 frames and check the checkboxes

step 6 In the animation palette click the position the player to the beginning.

Stop recording action done.

Now record SaveAnimatedGif

Step 1 Export Save For Web. In the dialog choose Gif, then click save. In the save dialog use the save in pull-down and choose where you want to save your animated gif files saved.. Warning do not touch the file name field leave it be.  Just click save.

Step 2 File Close when the pop up dialog open choose not to save.

stop recording action done

Now record the CreateAnimatedGifs

Step 1 File>Automate>Image Processor Pro  Input Folder point to folder you 1800 jpeg  save to an empty folder save PSD file

do not resize include running the FadeInName action

Step 2 File>Automate>Batch use the SaveAnimatedGif action the input file Input folder the folder you saved the PSD file in.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines