you probably used filezilla without changing the setting about files with no extension using binary.
if this is the case, you need to change that setting in filezilla. set to do all transfers in binary and also set it to transfer files with no extensions to binary instead of the default ascii.
that is what has corrupted your images.
now, when you get ready to do the upgrade this should not be an issue because you will be leaving the "files" folder in place on the server.
however the whole point of doing a backup of all the files is just in case.
therefore, when you make that new backup from your live server you will be doing it with the proper settings in filezilla and if you actually have to use that backup it will work correctly.
oh, and be sure to use the correct upgrade method listed here:
https://www.phpbb.com/support/docs/en/3 ... upgrade32/