1. Files with background (jpg)
2. Masks for those files (tif)
I'm trying to write a batch script to iterate over those files and remove the backgrounds for each of them, here is my code:
Code: Select all
for (( i = 10; i <= 19; i++ )) ### Outer for loop ###
do
for (( j = 10 ; j <= 19; j++ )) ### Inner for loop ###
do
Convert ${i}.jpg image_a_00${j}.tif -alpha off -compose CopyOpacity -composite %03d.png
done
echo "" #### print the new line ###
done
Thanks in advance
Running on MAC Imagemagick 7
EDIT:
Just checked the output and actually it doesnt work, the mask files don't get itterated for some reason..