FromTexture2D creates an ImageData object, filled with data from a Texture2D instance. It's important to note that the ImageData is a copy of the Texture2D, so making changes to the ImageData will not change the source Texture2D.
The following code shows how to create an ImageData instance from a Texture2D instance, then loop through each pixel: