Alex Rivera | Logout

How to convert image to byte array

Asked 2010-09-27T05:17:33.707
193

Can anybody suggest how I can convert an image to a byte array and vice versa?

I'm developing a WPF application and using a stream reader.

Edit
Report

1 Answer

48

Another way to get Byte array from image path is

byte[] imgdata = System.IO.File.ReadAllBytes(HttpContext.Current.Server.MapPath(path));
answered 2012-05-11T05:45:45.890

Your Answer