I've just been doing some extra testing
If I upload an image from a URL, it's fine. So the FTP code is perfect and isn't compressing anything.
I suppose it's the "photos.pick_image()" part. And I assume it's picking the compressed image (which iOS makes to speed up the Photos app) and not the original file.