Batching Alpha Channel Manipulation On Image Sequence
- April 7, 2022
- 3 replies
- 3819 views
Thanks to this community, I learned how to work on the alpha channel, adding, replacing and performing subtraction calculations between two masks to create a new alpha channel. Now the hard part (at least I think it will be), batching those operations on an image sequence. I've found PS batching to be very difficult in the past, compared to the QFX Queue (see included image).
In the queue seen in the image, with these few lines of script, it opens a file, loads an alpha and saves a new file. If it said FileAlphaSubtract instead of FileAlphaLoad, an 8bit mask image would be boolean subtracted from the existing image. The #### in the script replaces the numerical image sequence with the Start, Inc, Times values. Running the script is blazingly fast. I'm always marveled at how quickly it must be doing these operations AND writting a file to disk.
Now to Photoshop. As an animator compositing my renderings in Premier, I often do one of these two batch operations to an image sequence for use in my composite; add an alpha sequence to an image sequence or subtract an alpha sequence from an image sequence. Say I have Test0000.tif to Test0300.tif. I also have TMask0000.tif to TMask0300.tif. So the PS batching needs to automate what just learnd to do manually. Open an image, open the mask image, copy the mask image, paste it into the alpha channel of the main image, save to a new file, close the open images, repeat for the entire sequence.
Even more difficult, Open an image that already has alpha, open a mask image, added an additional channel in the first image, copy paste the mask image into the additional channel, run Calculations to subtract Aplha 2 from Alpha 1 creating a new channel, delete the Alpha 1 & 2 channels, then saving the file to a new image, and repeat for the entire sequence.
Just a few lines of script in QFX. I have a feeling this is not so simple in PS.
Thanks and best regards.
