Here's how the Batch Processing works. When you consider what is involved it's an elegant solution and everything fits.
It's all based on Copy_Mask which uses three byte arrays of pixel data. It compares the Mask to the Original and Copies All Pixels Under the Mask to the Destination byte array. So we start by setting up file paths for critical elements such as the Templates Folder, the location of BaseImages and Output Files Folder. This is a new Icon Image Processing Method, like an assembly line. There are many "if(EXISTS)" and Error Checking.
We select the IconList in the IconSet Directory which has Subdirectories of BaseImages and Output Files. Templates with Originals and Mask Files is above the IconSets. We get the Path from the filename. We read the IconList into a string array. The filename on the list is the same for originals and corresponding mask files. So we process in pairs, first we use png datatype to get a byte array (bmpData) of the original image. Then we do the same for the mask (bmpMask). Finally, we select the BaseImage (bmpDest). There are two BaseImages in a subdirectory of the same name for each IconSet. They are simply the Default Colored Drawer Images for Normal and Selected. We keep re-using the two BaseImages to make icons.
So now we have all three byte arrays. Time to call the main function. Copy_Mask(bmpData, bmpMask, bmpDest, width, height, bytesPerPixel); It produces a beautiful icon image using the BaseImage. The resulting image gets save to the Output Files Directory. It processes images in pairs. When the pair is finished and saved it calls Join_Icon using Copy_File and Copy_File_Appent to make Icons that are saved to another output directory. I will probably set up three folders for processing each with an IconList. AROS, SYS, and MISC. The AROS folder is for main system drawer icons. SYS is for def_icons but def_drawer is the exception. It's just a copy of the BaseImage. And MISC is for all other drawer icons to process.
It's very elegant that way. The Templates Directory resides above the Colored IconSets. It contains only the Originals of all drawer images and their corresponding mask images. In the individual IconSets Directories for example "Blue Icons" or "Green Icon" there are only two Subdirectories - BaseImages and Output Files. Under Output Files are Images and Icons. So in reality we only set up a new Colored Iconset Directory and copy in the Colored BaseImages and push the Start Buttom. Batch Processing! Lots of Colored Icons. Nice!