Xcode 8 throwing "Command /usr/bin/codesign failed with exit code 1" for Preview created pngs

After upgrading to Xcode 8, a couple of my apps starting throwing "Command /usr/bin/codesign failed with exit code 1" errors. I narrowed it down to pngs exported from Preview. Opening and exporting them from GIMP fixed it.

Xcode 8 throwing "Command /usr/bin/codesign failed with exit code 1" for Preview created pngs
 
 
Q