This is what someone else has done (not used cv2 myself) which looks v similar to yours but you don't seek back to start and you have
data = data[:,:,::-1]
which looks to be swapping RGB to BGR and is presumably an ok numpy slice, and your cvtColor() line looks oddly indented but that might be just because you are muddling up spaces and tabs!