Stop and skip photoshop action process for images with unequal layer height
- July 20, 2023
- 1 reply
- 1073 views
I will explain my problem quickly.
I batch editing high number of images. some of my images are defective.
Healthy images are like following. In fact, if we separate the components of the image into different layers, except for the last layer, all the layers have almost the same height. (40,41,42,43,44 pixel).
Defective images are like following. In fact, if we separate the components of the image into different layers, except for the last layer, all the layers have not the same height. (40,41,52,43,44 pixel).
If you pay close attention, in the defective image, one of the layers has a height of about 10 pixels more than the others.
I can't go through all the thousands of images one by one and remove defective or unequal layer height images.
I need a script that check image separated layers heights and if all the layers except the last layer have almost the same height, the action processing continues, otherwise the image is closed and the next image is executed.
for example:
number of layers 7 - height of layers {60,40,42,43,44,39,40} --> script close image and action must excute next image
number of layers 9 - height of layers {41,40,42,43,44,39,40,39,38} --> script does not create an obstacle and the action continues its work.
note that script no need to separate layers. script run after action separated layers by another script and only check height of layers except latest layer. script decides whether the action will continue or the image will be closed. In fact, the job of script in this case is to find images with mismatched layers (except latest layer).
if have any idea or script please provide here.

