Specifically JPEGs.
BadPeggy (the original site is down so I linked to a third-party site) can find the corrupted JPEGs. Usually, if IrfanView can open it (I haven’t had any trouble at all) you can crop out the corrupted part (on my images it tended to be near the bottom so it wasn’t like half a person’s face was cut off or something) and save it over. However if it’s badly corrupted enough (IrfanView won’t open it or there’s too much data missing) this method doesn’t work too well and you’re better off just finding the picture again.
However, good backups should prevent the whole situation from happening in the first place