Answer the question
In order to leave comments, you need to log in
How to see a picture in binary code?
Can you tell me how to read the picture in the form of a binary code?
Answer the question
In order to leave comments, you need to log in
using System;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
FileStream fs = new FileStream(@"H:\Temp\test.bmp", FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
foreach (byte b in r.ReadBytes((int)r.BaseStream.Length))
{
Console.Write(b);
Console.Write(' ');
}
Console.ReadKey();
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question