Over time of downloading images from various sites I ended up with a bunch that had the wrong extensions. Either jpg that were really png and vice versa along with some ending in jpg-large. This became more of a problem in that some viewers did not know how to open the images with incorrect file extensions. After a few friends mentioned having similar issues I wrote a script to correct the extensions. This script is written for BASH 4 or above and runs recursively on directories scanning all files to correct jpg and png extensions.
Checksums for pic-jpgpng-fix_v09.sh
Signed by my certificate with fingerprint: FBD2 A63D 0835 965D 0D94 1098 D54F 078F A777 5B9D