Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Batch removal of background - getting errors

Explorer ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

I am trying to remove the background from 300 images. The images are pretty much identical. 

 

First I tried setting up a batch procedure where I manually unlocked the background, used the quick selection tool to select the background and then finally deleted the background. But when I run the batch thing on the folder with the images it immediately returns the error "the command Delete is not currently available". I also tried running the same with the image processor. Same error.

 

Then I tried recording a batch operation with the "Remove background" tool built into Photoshop - that does work, but it removes way too much of the background.

 

I have attached a sample image.


Can anyone help with this?
Thanks!

TOPICS
Actions and scripting

Views

303

Likes

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 3 Correct answers

Adobe Community Professional , Aug 03, 2021 Aug 03, 2021

Likes

Translate

Translate
Adobe Community Professional , Aug 04, 2021 Aug 04, 2021
On your gif, an error occurs on the "delete" command, because there is no selection due to the fact that the step of using the selection tool has not been recorded. Did you RERECORD the Action.? Upload a new video, better not GIF.  

Likes

Translate

Translate
Adobe Community Professional , Aug 09, 2021 Aug 09, 2021
Is »Allow Tool Recording« enabled?  Edit: 

Likes

Translate

Translate
Adobe Community Professional ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

Could you please post a meaningful screenshot with the pertinent Panels (Toolbar, Layers, Options Bar, …) and the fully expanded Action in the Actions Panel visible at the time of the error being thrown? 

 

»I manually unlocked the background«

Why did you not make that part of the Action? 

Likes

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
Explorer ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

Thank for your reply. 

I meant to say that I unlocked the background as part of the batch recording process - shouldn't have said manually. 

I made a GIF recording of the process, and took a screenshot at the time of the error. Hope that helps ? 🙂

Likes

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
Adobe Community Professional ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

2021-08-03_17-33-00.png

Likes

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
Explorer ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

Still getting the error, but didn't know about these settings so will have to look more into those. Thanks!

Likes

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
Adobe Community Professional ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

quote

Still getting the error, but didn't know about these settings so will have to look more into those. Thanks!


By @MartinNP

 

You have been hinted that you should recreate the Action with this option enabled. Did you do it?

Likes

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
Explorer ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

Yes, I enabled as shown in the screenshot but still getting the same error.

Likes

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
Adobe Community Professional ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

On your gif, an error occurs on the "delete" command, because there is no selection due to the fact that the step of using the selection tool has not been recorded. Did you RERECORD the Action.?
Upload a new video, better not GIF.

Likes

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
Explorer ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

Looks like that was the issue. I have no idea why the selection wasn´t included the first times I tried. Maybe because the selection button was activated in advance and the actual selection can´t be recorded unless the button click is recorded. Anyway, looks like it works now. Thanks!

Likes

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
Adobe Community Professional ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

The first answer of jazz-y showed what was the problem.

Likes

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
Adobe Community Professional ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

That Layer is not a Background Layer so the Action cannot perform the task. 

Likes

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
Explorer ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

This may be a dumb question - but I unlocked the bg layer because otherwise I'm not able to remove to delete the background once selected with the quick selection tool. What am I missing here?

Likes

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
Explorer ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

Was finally able to solve it - thanks for the help! 

Likes

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
Adobe Community Professional ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

On the .gif it happens too fast to see if the second image used a background.

Likes

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
Explorer ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

All the images are used as background, but my problem is that I don't know how to delete the background unless the batch is set to unlock the bg layer.

Likes

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
Adobe Community Professional ,
Aug 03, 2021 Aug 03, 2021

Copy link to clipboard

Copied

From the .gif it looks like that certain image has no background but regular layer.

Likes

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
Explorer ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

When I open them individually they all have a locked background, but the batch process unlocks them and then the error comes.

Likes

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
Adobe Community Professional ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

Please fully expand your Action so all steps and there setting are visible and post a screen capture of your action.  There is most likely some dependency that failed to work or record correctly.

 

Try this action: RemoveBG.atn 

JJMack

Likes

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
Explorer ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

I was able to solve it - thanks for the suggestion, will definitely also try out the tool you sent! Thanks.

Likes

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
Adobe Community Professional ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

@MartinNP , if you have difficulties with the background layer, it is better to create a mask - this is guaranteed to work in any case (the conversion of the background layer to a regular layer will done automatically). In this case, the action can be reduced to just 2 commands: creating a selection with "allow tool recording" enabled and creating a mask (hold alt key, to create inverted mask). 

2021-08-04_12-58-57.png

Likes

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
Explorer ,
Aug 04, 2021 Aug 04, 2021

Copy link to clipboard

Copied

Interesting, will definitely look into that method as well. I was able to make it work though, but that you very much for the help.

Likes

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
Explorer ,
Aug 09, 2021 Aug 09, 2021

Copy link to clipboard

Copied

I am recording a set of tasks as an action, but for some reason the quick selection tool task is not recorded (before this task I have recorded a task setting the canvas size and adding a solid color background so the problem is not that the selection is happening outside of the canvas).

The issue results in the error message that the command "smooth" is not currently available (this is because no selection is recorded).

I attach a list of the tasks in the recorded action.

Likes

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
Adobe Community Professional ,
Aug 09, 2021 Aug 09, 2021

Copy link to clipboard

Copied

Is »Allow Tool Recording« enabled? 

Edit: Screenshot 2021-08-09 at 10.59.36.png

Likes

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
Explorer ,
Aug 09, 2021 Aug 09, 2021

Copy link to clipboard

Copied

Thanks! That was the problem! I thought I had managed to record selection before, but wasn't sure - now I realised that that was done on my other computer 🙂
I am so grateful, you made my dag 🙂

Likes

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
Adobe Community Professional ,
Aug 09, 2021 Aug 09, 2021

Copy link to clipboard

Copied

As c.pfaffenbichler has replied you can enable Tool Recording to record the use of brush type tools.   The implementation of tool recording is not the greatest all changes to the tool options during use may not be recorded. Action that record tool usage need to be used on documents that have the same canvas size that have similar content. 

 

You can also use the quick selection in Actions without enabling all brush type tools recoding.  Create a Path then stroke the Path with the quick selection tool set with the option you want use.  Myself I would use Stroke Path over tool recording.

image.png

JJMack

Likes

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
    • 1
    • 2