i am reading of a Texture2D the given colors to extract my height data of a heightmap image. Therefor i use this code:
Int32[] data = new Int32[heightMap.Width * heightMap.Height];
heightMap.GetData<Int32>(data);
heightMap is a Texture2D object with a width and height of 500, so the data-array gets at runtime a size of 250.000. Fine but it fails on getting the data from the Texture2D by using the GetData function

The type you are using for T in this method is an invalid size for this resource.
I found something with google where people switched to Color instead of Int32 but for me it doesn't work it's returns the same error

I used a smaller heightmap before with a resolution of 128x128 this works!!

Does someone know how to solve this