I
I
Ingerniated2017-06-12 20:56:31
Images
Ingerniated, 2017-06-12 20:56:31

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

2 answer(s)
J
Johnny Gat, 2017-06-12
@Ingernirated

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();
        }
    }
}

A
Alexey Lashko, 2020-05-20
@LASHKOAG

more EmEditor

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question