Processing batches of images in Photoshop that stop because of a quick mask?

Occasionally when working on an image I forget to delete a quick mask before saving the file. Not too much of a problem most of the time but a real pain if that image is included with hundreds of more images that need to be processed through an action.

For instance when preparing files for Getty I need to intelligently adjust the output levels using a custom curve . If the action is run on an image with a quick mask it will stop the action.

I like to walk away from the computer when processing lots of files so it not good to return and find that a batch of 200 images is only 4 pictures in because of an empty quick mask.

Because the quick mask tool is a toggle (Q key) it cannot be included in an action as it will turn on quick mask for images that don’t have one as well as turn it off for ones that have. It is however possible to sort this!:

1. Open an image and press the Q key to give it a quick mask.
2. In your action click on the top action item and press the record button
3. Open the channels tab
4. Click on the Quick Mask channel
5. Alt or right click on the Quick Mask channel and select delete
6. Stop the recording and move the new action step to the top of the action.

From now on the action will delete any quick mask layer if there is any, if there isn’t one then it will just fail gracefully and continue.