After copying photos from my iPhone 4S (iOS 5.1) to a PC, I noticed some weird rotation behaviour, with some files appearing upside-down. When I tried to rotate them, I got the error “You cannot rotate this image. The file might be in use or open with another program, or the file or folder might be read-only.”
Turns out this is a quirk with the new iPhone software, which is explained in detail here: http://www.neowin.net/news/ios-5s-hardware-shutter-gives-upside-down-images
I solved it by following the suggestion on this site http://www.sync-iphone.com/photos/fix-iphone-4s-upside-down-photos-solution.html to use some free software called BIMP Lite, which corrected my photos with no errors.