Free for PREMIUM members
Learn how to a build a cloud-first strategyRegister Now
private byte ReadImage(string filename)
FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
byte image = br.ReadBytes((int)fs.Length);
catch (Exception ex)
Open in new window
byte myImageBytes = System.IO.File.ReadAllBytes("MyImageFilePath");
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.