views:

54

answers:

2

I need an image 1px X 1px or empty Jpeg image using c#

+4  A: 

I can't test this right now, but shouldn't this work?

(new Bitmap(1,1)).Save(name,ImageFormat.Jpeg);
Marcus Johansson
+1  A: 

You can do something like this ..

            var image = new Bitmap(1, 1);
            MemoryStream stream = new MemoryStream();
            image.Save(stream, ImageFormat.Jpeg);
            stream.Position = 0;

And then save the stream to a file.

Hope this helps.

WestDiscGolf