Skip to content

How to Automate Image Processing in Photoshop By Recording Actions and Batch Scripts

FurkanGozukara edited this page Oct 27, 2025 · 1 revision

How to Automate Image Processing in Photoshop By Recording Actions and Batch Scripts

How to Automate Image Processing in Photoshop By Recording Actions and Batch Scripts

image Hits Patreon BuyMeACoffee Furkan Gözükara Medium Codio Furkan Gözükara Medium

YouTube Channel Furkan Gözükara LinkedIn Udemy Twitter Follow Furkan Gözükara

In this video, I am showing how to record your commands or actions as a script in Adobe Photoshop and execute that script as an automated batch on a folder of images. Furthermore, I show how to select all fully transparent pixels in an image and replace them with any color you choose.

If I have been of assistance to you and you would like to show your support for my work, please consider becoming a patron on

🥰 https://www.patreon.com/SECourses

Stable Diffusion Tutorials, Guides, Tips and Tricks playlist :

https://www.youtube.com/playlist?list=PL_pbwdIyffsmclLl0O144nQRnezKlNdx3

00:00:00 Introduction to best Batch Image Processing by Using Photoshop Scripts / Actions

00:00:55 How to open actions window / panel in Adobe Photoshop

00:01:09 How to define a new action and start recording an action

00:01:44 How to add a white background to any image by using Photoshop

00:01:47 How to add a new layer in Photoshop

00:02:03 How to hide a layer in Photoshop

00:02:07 How to use Paint Bucket Tool of Photoshop to fill a layer with a color e.g. white

00:02:28 How to set color of Paint Bucket Tool

00:02:45 How to change layer order to set / manage layers visibility in Photoshop

00:02:50 How to merge layers in Photoshop

00:02:56 How to execute scripts and save result files in a different folder and keep source as it is in Photoshop batch processing

00:03:19 How to stop recording of a script

00:03:32 How to do batch execution of a script in Photoshop

00:04:01 How to pick and set source and destination folders with correct settings in Photoshop batch script execution

00:06:27 How to check error logs of batch image

00:07:21 How to select all 100% transparent pixels in an image and replace them with any selected color by using Photoshop

00:07:54 How to select non-transparent pixels in Photoshop quickly

00:07:59 How to inverse selected pixels in Photoshop

00:08:17 How to select transparent pixels in Photoshop

00:08:20 How to enable edit in Quick Mask Mode in Photoshop

00:08:55 Change threshold in quick mask mode to select all fully transparent pixels

00:09:26 How to fill with color all of the selected pixels in Photoshop

Introduction to Best Batch Image Processing by Using Photoshop Scripts / Actions

Batch image processing is a powerful tool that allows you to apply the same set of edits to multiple images at once. This is particularly useful when you have a large number of images that need to be edited in the same way. One of the most efficient ways to do this is by using Photoshop scripts and actions.

In this article, we will go through the steps of using Photoshop scripts and actions to perform batch image processing. We will cover how to open the actions window/panel in Adobe Photoshop, how to define a new action and start recording an action, and how to add a white background to any image by using Photoshop. We will also discuss how to add a new layer in Photoshop, how to hide a layer, how to use the Paint Bucket Tool to fill a layer with a color, and how to set the color of the Paint Bucket Tool.

We will also go over how to change layer order to set and manage layers visibility in Photoshop, how to merge layers, and how to execute scripts and save result files in a different folder while keeping the source files as they are. We will also discuss how to stop recording of a script and how to do batch execution of a script in Photoshop.

One important aspect of batch image processing is setting the correct source and destination folders with the correct settings. We will cover how to pick and set these folders in Photoshop batch script execution. Additionally, we will also discuss how to check error logs of batch images, and how to select all 100% transparent pixels in an image and replace them with any selected color by using Photoshop.

Another useful technique is the ability to quickly select non-transparent pixels in Photoshop, inverse selected pixels, and select transparent pixels. We will also cover how to enable edit in Quick Mask Mode in Photoshop and change the threshold to select all fully transparent pixels. Finally, we will go over how to fill with color all of the selected pixels in Photoshop.

Overall, by following these steps and techniques, you can streamline your image editing process and save time by batch processing your images with the help of Photoshop scripts and actions.

thumb: freepik upklyak

Video Transcription

  • 00:00:01 Greetings everyone.

  • 00:00:02 In this video I am going to show you how to record your comments or actions as a script

  • 00:00:07 in Photoshop and execute that script as an automate batch on a folder of images.

  • 00:00:13 For demonstration, I am going to add a white background color to images with transparent

  • 00:00:18 backgrounds.

  • 00:00:19 I picked this as an example because, since Stable Diffusion is not able to process transparent

  • 00:00:26 pixels, we have to fill transparent pixels with white color or any other color.

  • 00:00:31 Furthermore, I will show how to select all fully transparent pixels in an image and replace

  • 00:00:38 them with any color you choose.

  • 00:00:40 So let's start with opening our first image to record our script.

  • 00:00:46 You see, the background is transparent.

  • 00:00:49 So first we need to open the actions folder to start recording our actions.

  • 00:00:55 To do that, go to the window folder in the top, in the top menu, and in here go to actions

  • 00:01:01 button and click it.

  • 00:01:03 So you will get opened the actions panel like this.

  • 00:01:09 First of all, we need to define a new action.

  • 00:01:11 To do that, go to the plus button on the actions menu and it will open this new action window.

  • 00:01:17 Let's give it a name: white background color.

  • 00:01:23 It will be saved in the default actions folder and you can assign a function key.

  • 00:01:29 You can assign a name.

  • 00:01:30 I will assign as gray, for example and click record.

  • 00:01:35 So now the recording is started.

  • 00:01:37 You can see that the red button in here is highlighted like this.

  • 00:01:44 So to add a white background, we are going to add a new layer.

  • 00:01:47 To do that, Go to the right bottom and in here you will see plus icon.

  • 00:01:52 Just click it.

  • 00:01:53 It will compose a new layer, as you can see right now in here.

  • 00:01:58 So I will fill that transparent layer with white color.

  • 00:02:02 To do that, First I am clicking this eye icon.

  • 00:02:04 It is hiding the layer one.

  • 00:02:07 I am going to left menu in here and I am picking the paint bucket tool.

  • 00:02:14 Right click it.

  • 00:02:15 You will see paint bucket tool.

  • 00:02:16 It is under the magic eraser tool.

  • 00:02:19 You could be also have selected this gradient tool or 3D material drop tool, so don't get

  • 00:02:26 confused if they are selected.

  • 00:02:28 Okay, so this is selected as a paint bucket tool and it will use the color displayed in

  • 00:02:33 here.

  • 00:02:34 I am using the white color and I am left clicking, so entire layer is filled with white background.

  • 00:02:41 Then I am enabling the layer one once again.

  • 00:02:45 I am moving it to up and now it is visible like this.

  • 00:02:50 Now we will merge them down with merge down.

  • 00:02:54 Okay, we are ready.

  • 00:02:56 If you want to save this image, overwrite it, then you should also go to the file and

  • 00:03:03 save it.

  • 00:03:04 However, if you don't want them and you want these actions to be executed and saved on

  • 00:03:10 a different folder so you will both keep the source images and you will also have new images,

  • 00:03:16 then you shouldn't save it.

  • 00:03:19 You should just stop recording in here.

  • 00:03:25 Okay, I will stop the recording Now our action is ready.

  • 00:03:32 Time to do batch execution.

  • 00:03:35 To do that, I will go to the left top menu in here, click file and you will see automate

  • 00:03:42 in here and just click the batch.

  • 00:03:47 So it will open the batch operations window for you.

  • 00:03:51 In here you will see the set as default actions.

  • 00:03:55 This is the action group we saved our action and in here we will see the white background

  • 00:04:00 color.

  • 00:04:01 So we are going to first pick our source folder, click the choose and choose the folder that

  • 00:04:07 you want to execute on.

  • 00:04:10 I am selecting example folder where my monster artworks are located and you should pick overwrite

  • 00:04:21 action, open command, because we didn't include open command.

  • 00:04:30 Actually, you shouldn't pick it unless you explicitly defined open command in your script.

  • 00:04:39 So we are not clicking it.

  • 00:04:41 You can click include all subfolders, suppress file open option dialogs and suppress color

  • 00:04:47 profile warnings.

  • 00:04:49 I am going to.

  • 00:04:50 By default it will be selected as stop for errors, but I don't want it to stop for errors,

  • 00:04:55 so I am clicking log errors to a file.

  • 00:04:59 Pick a folder to save your errors.

  • 00:05:02 So to do that, click save as button in here.

  • 00:05:05 Select the folder where you want to save.

  • 00:05:07 I will save them inside downloads folder and give it a name: error logs.

  • 00:05:11 Just click save and it will be also displayed here.

  • 00:05:14 Okay, now, since we are going to save our images in a new, different folder, I am picking

  • 00:05:21 the destination folder.

  • 00:05:23 You can also click save and close in here, as you can see.

  • 00:05:27 So it will just execute action script on the source images and then close them.

  • 00:05:33 So I am picking folder here.

  • 00:05:35 So let's pick a folder.

  • 00:05:37 Let's say, let's compose a new folder.

  • 00:05:40 Processed images, okay, and then select folder.

  • 00:05:44 Okay, overwrite action save as command.

  • 00:05:47 This is what we are going to do.

  • 00:05:51 It will save as default, like this.

  • 00:05:55 Actually, let's read the description: overwrite action save as command.

  • 00:05:59 Okay, when this option is on, files will be saved to the destination folder only by save

  • 00:06:05 as steps in action.

  • 00:06:07 So you should not pick this, because we didn't explicitly saved.

  • 00:06:11 Okay, now we are ready, let's just click okay, so the files will be opened, our script will

  • 00:06:17 be executed, then they will be closed and they will be saved inside our processed folder.

  • 00:06:23 Let's open it to see.

  • 00:06:26 Okay, the processing has finished.

  • 00:06:29 We got one error, which is this one: it says that could not complete the command because

  • 00:06:35 the selected areas are empty.

  • 00:06:37 So if you encounter an error, you can check that specific file.

  • 00:06:41 So let's see.

  • 00:06:42 Let's compare our processed images and example folder.

  • 00:06:45 So I am going to open an example image.

  • 00:06:48 These monsters are from my game, which is MonsterMMORPG.

  • 00:06:52 Okay, let's just close this window first and then let's open our image.

  • 00:06:59 Okay, you see, it currently has a white background like this, and let's also open its original

  • 00:07:06 version, which is here I will open as a new tab.

  • 00:07:09 Okay, so this was the original image and this is the white background added image.

  • 00:07:16 It is looking great.

  • 00:07:17 As you can see.

  • 00:07:18 It is as expected.

  • 00:07:20 Now I will show you the another thing: how to select all of the transparent pixels in

  • 00:07:27 this image and fill them with any color you want.

  • 00:07:33 But we will select the fully transparent images.

  • 00:07:36 For example, you see there is a semi transparent part in here.

  • 00:07:39 It is as a shadow, so I am not also going to select this area and I will select everywhere

  • 00:07:46 where it is fully transparent.

  • 00:07:49 To do that, click the control button, left control on your keyboard.

  • 00:07:54 Now click the layer image, the thumbnail, as you can see right bottom in here.

  • 00:07:59 So it has selected all of the area that contains some pixels.

  • 00:08:09 Then go to the top menu and in here you will see select under the select option inverse.

  • 00:08:15 Okay, click inverse.

  • 00:08:17 So now transparent pixels are selected mostly.

  • 00:08:21 Then go to the quick mask mode which is in the left menu.

  • 00:08:26 You will see edit in quick mask mode which is Q letter on keyboard.

  • 00:08:31 Okay, then we are entered the quick mask mode.

  • 00:08:37 Then in here go to the image and adjustments in here, and in here go to the threshold button,

  • 00:08:47 adjustments image, adjustments, threshold.

  • 00:08:50 So we are going to set the threshold level to 255.

  • 00:08:55 So you see, when we set it to 255 it is selecting all of the pixels that is not fully transparent

  • 00:09:05 in the quick mask mode.

  • 00:09:07 Click OK.

  • 00:09:08 Then exit from the quick mask mode.

  • 00:09:11 So now all of the pixels which are not fully transparent are deselected.

  • 00:09:20 So all of the fully transparent pixels are currently selected.

  • 00:09:22 Then we go to the edit menu in the top menu and actually, before doing that, before doing

  • 00:09:34 that, we are selecting layer like this.

  • 00:09:36 Then we are going to do edit mode and we are going to go to fill, and in here we are going

  • 00:09:43 to fill with a color.

  • 00:09:45 I will.

  • 00:09:46 It is currently selected as white.

  • 00:09:47 Click OK, Click OK.

  • 00:09:50 And now all of the fully transparent pixels are filled with white color.

  • 00:09:57 So you see, if there is even a slight pixel, then no white color is filled.

  • 00:10:04 And if it is fully transparent, then the white color is filled, as you can see.

  • 00:10:11 So this will produce a different image than adding a white background layer to the image.

  • 00:10:18 It is up to you, whichever you want to do.

  • 00:10:22 So when you click save, it will be saved.

  • 00:10:24 And you see, these two images are now currently different.

  • 00:10:31 OK, if we saved this as an action, it would be also saved like the previous action, and

  • 00:10:38 you could also do batch execution like this on all of the images.

  • 00:10:45 So the script is working, everything working same principle for every action.

  • 00:10:52 You can do whatever you want with actions: save them and execute them on images as a

  • 00:10:58 batch.

  • 00:10:59 It is totally up to you.

  • 00:11:00 Thank you very much for watching.

  • 00:11:02 If you have enjoyed, please click like subscribe and leave a comment.

  • 00:11:07 You can also join our discord channel from about page of our channel.

  • 00:11:12 Go to about page and in here you will see official discord channel.

  • 00:11:16 We also have a Patreon page.

  • 00:11:18 If you support us on Patreon, we would appreciate very much.

  • 00:11:21 Hopefully more quality videos will come soon.

  • 00:11:24 So far we have six patrons and I thank you very much to them.

  • 00:11:29 They are giving me strength to continue.

  • 00:11:32 Hopefully see you later in another video.

Clone this wiki locally