I used a hex editor to view them but they are invisible in hex editor |
Nothing is invisible in a hex editor.
So I guess what they are ??? |
This question is ill-founded and doesn't really make sense. What those characters are is simply a textual representations of the bytes in the file. But that doesn't really help you understand it, and you won't understand it unless you understand how files work.
So here's a big explanation:
A file is just a [very large] series of bytes. Each byte is 8 bits, each bit is either a 1 or a 0.
That's it. There is nothing more to them than that
*. Files do not actually contain images... or text... or anything. The only thing they contain is bytes. Just lots, and lots of bytes.
Now the reason you can have a bmp file that contains an image is because programs like Paint look at those bytes and interpret the numbers to be colors. And the reason you can have text files is because programs like Notepad look at those bytes and interpret the numbers to be text.
So when you open an image file in Notepad, it will try to interpret the data as text, even though it is
supposed to be interpretted as image data. So you'll end up seeing meaningless garbage.
What makes
hex editors special is that they do not interpret the data as anything -- they merely load it and display it for what it is: A raw series of bytes.
For example... here is what a simple text file looks like in a text editor (Notepad++):
http://imgur.com/DmEjFo8,rS84nGx#0
Here is what that same file looks like in a hex editor (HxD):
http://imgur.com/DmEjFo8,rS84nGx#1
In the hex editor... see all those numbers in black in the center? Those are the bytes. That is what is
actually inside the file.
When you look at the file in Notepad++, it is not showing you those numbers. Instead, it looks at the number and say "what character should this number be interpretted as?", and will display a textual character.
The number '41' gets interpretted as the letter 'A'. The number '20' gets interpretted as a space, and the number sequence '0D 0A' gets interpretted as a new line.
For an example of a bmp file, here is one as viewed in any image viewer:
http://imgur.com/gwk9Wo8,IZDJvE4#0
And here is that same image viewed in a hex editor (HxD):
http://imgur.com/gwk9Wo8,IZDJvE4#1
As you can see, this file contains a lot of numbers like '00', which doesn't have a [visible] character representation. So if you were to try to look at this in a text editor like Notepad, it would look like garbage... either not showing those bytes or putting some filler character in.
*except for metadata and stuff, but nevermind that