String SourceLoc
=
"
D:/Images/photo.jpg
"
;
![](https://i-blog.csdnimg.cn/blog_migrate/478e47a1b6443b7f91760d7c12e0ca2e.gif)
String DestinationLoc
=
"
D:/Images/TestImage.jpg
"
;
![](https://i-blog.csdnimg.cn/blog_migrate/425f40b1d7c0e2762dcc7b0faf021b99.gif)
FileStream fs
=
new
FileStream(SourceLoc, FileMode.Open,FileAccess.Read);
byte
[] ImageData
=
new
byte
[fs.Length];
![](https://i-blog.csdnimg.cn/blog_migrate/0f8b67ef2e90700c63799fb9ebcfae74.gif)
fs.Read(ImageData,
0
,System.Convert.ToInt32(fs.Length));
![](https://i-blog.csdnimg.cn/blog_migrate/58807b752565716d9bc5b56e064b4759.gif)
fs.Close();