Are they on a memory card? You dont lose anything from memory cards. Yes if its on the phone though it will be gone. Most roms require a factory wipe to ensure no portion of the previous OS are still present.
JDub is right. If you don't want your pics on your sd card you will have to put them on a cloud or put them on your computer. However Dropbox, Google Plus and Facebook have a automatic upload photos feature. I personally use Dropbox, for I am not really the social networking type.
Sent from my Nexus 10 using Android Central Forums