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.
For Converting an Image object to byte[] you can do as follows:
byte[]
public static byte[] converterDemo(Image x) { ImageConverter _imageConverter = new ImageConverter(); byte[] xByte = (byte[])_imageConverter.ConvertTo(x, typeof(byte[])); return xByte; }