Quantcast
Channel: WP7 – Developer Publish
Viewing all articles
Browse latest Browse all 51

How to Convert an Image to Byte Array in C# ?

$
0
0
You can convert an Bitmap image to byte array in C# using the  BinaryReader’s ReadByte method. Here are the steps that you need to follow for the conversion. – Create an instance of the FileStream and specify the file path along with the File Mode and the File Access. – Create an instance of the BinaryReader and specify the fileStream instance as parameter for the constructor. – Read the Byte one by one from the Binary reader and assign it to the Byte Array that you want to return. Here’s a code snippet demonstrating how you can convert an image

Viewing all articles
Browse latest Browse all 51

Trending Articles