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

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

1.9K

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

Guide , Aug 03, 2021 Aug 03, 2021

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

Votes

Translate

Translate
Valorous Hero , 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.

Votes

Translate

Translate
Community Expert , Aug 09, 2021 Aug 09, 2021

Is »Allow Tool Recording« enabled? 

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

Votes

Translate

Translate
Adobe
Community Expert ,
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? 

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
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 ? 🙂

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

Copy link to clipboard

Copied

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

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
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!

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
Valorous Hero ,
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?

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
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.

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
Valorous Hero ,
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.

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
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!

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

Copy link to clipboard

Copied

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

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 ,
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. 

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
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?

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

Copy link to clipboard

Copied

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

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
LEGEND ,
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.

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
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.

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
LEGEND ,
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.

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
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.

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 ,
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

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
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.

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
Guide ,
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

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
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.

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
Contributor ,
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.

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 ,
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

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
Contributor ,
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 🙂

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 ,
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

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