He's wrapping the image in a link, so there's still a point to the image style. However, since
'#(<img.*?src="(.*?)"[^>]*>)#i'
does retain the image style (along with everything else in the image element) I don't see the problem.
The first capturing subpattern selects the entire image tag, while the second one selects the entire src attribute value. You use the second pattern to set the href attribute of the wrapping anchor and put the entire image tag inside the anchor. Thus, nothing should be lost. What input do you have? What output do you have? What in the output isn't meeting your expectations?
Also note that since the first capturing subpattern encompasses the entire pattern, it's completely unnecessary to have a subpattern to begin with. You could drop the outer () and then change $1 to $0 and $2 to $1. But it will change nothing about what the regexp does.
preg_replace('#<img.*?src="(.*?)"[^>]*>#i',
'<a rel="colorbox" class="rollover" href="$1">$0</a>'