Revert "Catch bad image format exception and provide warning."

This reverts commit 69d61cfe1268b7919b268ec56847ea44ef82727e.
Revert "Revert "Catch bad image format exception and provide warning.""

This reverts commit 3f60647e309ad11c85b8e7ec0e28b803d8e1698c.