My phone dropped an started turning on an off by itself I lve had this problem before so i just took my battery out for awhile when i put it back in an turned it back on all it would do was go to the blue screen then the Samsung screen then repeat itself it won't go to the main screen . I haven't did a factory reset cause i haven't put all my pics on an sd card yet.
From my experience and what others say on the net, the s2 does not delete pictures of the phone during factory reset.
I have done it myself by holding buttons at the start and the pictures stayed on the phone (not on the memory card).
I had to delete the pictures manually after that (I had my phone sent back for RMA).
Hope this helps.