I have a large database of images, hundreds of thousands, I need to work with, but I need custom software to do a few simple preliminary steps.
1. Some of the images in my database are corrupt, invalid, or not a jpg image. I need the software to be able to detect and remove these files.
2. I only need 100 files in each folder. After the software has determined the image is valid, it must be able to trim the folder's contents to 100 jpg image files, sorted by file modified date, and sequentially renamed using the folder name as a prefix and at least 3 decimal places for the numbering. For example, the images contained with a folder called TREES should all be renamed TREES_001, TREES_002, and so on.
3. I would also like the program to color average the images and resize / crop them, regardless of original aspect ratio, to 300 px X 300 px.
4. I would also like the program to export a list by folder (as a csv file) of the HEX and RGB vaule corresponding to the averaged color of each image.