How to choose the texture which is not in rectangular form?

Hi all,

How do I choose/make a 2D texture image using glReadPixels but the area of my interest is not a rectangular. The area could be a slunted rectangle, triangle or even a sphere? Anyone can help me please?

regards,