I have a performance problem with converting Texture2D to PNG. Since I am a total noob at DirectX, I used the Texture2D.ToStream method to map texure data to png data, and it looks kinda slow to me.
All application does is draws 1000 random lines to texture and then exports that texture to stream (byte array is the final product). The proces is repeated many times (~100) to get a collection of different images and exporting texture to stream takes ~98% of application run time.
Is there an alternative way to map texture data to image data that will be faster?