We needed a PHP based high resolution image combiner that took two folders:
- Low Resolution - any file file type
- High Resolution - again any file file type
The following script uses PHP 5's
RecursiveDirectoryIterator to loop through the folders and then uses the returned file object to get the size of the image performing a simple check based on the logic that the largest image is most likely the high-res version.
The file is executed by running it from the command line as such: