Ethernet Module Behaving better, but

The ethernet example here: works fine for me now, I think my DP red board may have been greying out under load and causing the intermittent failure. Its been replaced, and the example works fine now.

But, serving an image only seems to work for images captured with the camera. If I use the code below to create an image to serve, I get a broken image icon in the browser. While a packet sniffer does show a load of image sized data going over the wire. It just can’t display it.

Bitmap b = new Bitmap(320, 240);
b.DrawLine(Colors.Red, 20, 0, 0, 319, 239);
GT.Picture picture = new GT.Picture(b.GetBitmap(), GT.Picture.PictureEncoding.BMP);

I get the same problem if I use an Image (called ‘background’ in the example below) on a Canvas providing layout for a WPFWindow that I then convert to a Picture by doing:

Bitmap bitmap = background.Bitmap;
GT.Picture picture = new GT.Picture(bitmap.GetBitmap(), GT.Picture.PictureEncoding.BMP);

Anyone got an explanation / quick fix for this?

Thanks in advance for your help.

I don’t have my kit in front of me to try, but is this possibly an issue with the Picture structure expecting a file header and not just the image data?

check out this method:

Again, I don’t have my stuff in front of my to test, just trying to throw out suggestions.

–Mr. Bildo