I apply filters to the incoming image with the request, and then send it back. I process it all now using Bitmap, very convenient, but the performance suffers greatly. Are there any libraries / classes specifically for this purpose?
Conversion from incoming stream to image
var Picture = new Bitmap(listenerContext.Request.InputStream); Search by pixels to set a new color. GetPixel low-performing method (I think)
for (int x = 0; x < bmp.Width; x++) for (int y = 0; y < bmp.Height; y++) { var temp = bmp.GetPixel(x,y); bmp.SetPixel(x,y, Color.FromArgb(temp.A,temp.R,temp.G,temp.B)); } Saving pictures in response to a request
Picture.Save(listenerContext.Response.OutputStream, ImageFormat.Png);