How do I convert a JPEG file back to text?

E

Emily Post

Several text documents were incorrectly put into photo file folders. I need
to change them from JPEG back to Word, using Windows XP.
 
M

Murray

You mean they were given *.jpg file extensions? Just rename them with the
*.txt extension.
 
K

Kevin Spencer

You can no more turn a text file into a JPG by putting it into a photo
folder than you can turn a cat into a hat by putting it in a hat box.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
E

Emily Post

Murray, thank you for responding. However, I tried just changing the
extension and that didn't work. I opened the file and tried to make
formatting changes, however, none of those worked either. I also have a file
with a GIF extension, but nothing worked for that, either. Again, thanks.
 
E

Emily Post

Murray, thank you. I tried just changing the extension, however, that didn't
work. Then I opened the file and tried reformatting the document, but that
didn't work either. I also have a file that has a GIF extension, and I tried
to rename and reformat that, but it didn't work on GIF files either. Again,
thanks for your response...and, if you meant something other than what I did,
please advise me.
 
M

Murray

As Kevin said, simply putting a file from one folder to another folder
cannot possibly change its internal format. A text file is a text file
regardless of its location on your hard drive, or its file extension. If
you cannot open these files in Notepad and read them, then they are not text
files.
 
E

Emily Post

Kevin. Thank you for responding. You are correct in saying that the text
file didn't turn into a picture, however, it did turn into a lot of little
boxes and squiggles, and it now has a JPEG extension to it. When I tried to
change the text back to English, I couldn't.
--
Emily Post

Murray, most of what I wrote to you didn't show in my original response.
What I wrote before was that, without opening the file, I tried your
suggestion and nothing happened. I opened the file and tried to save it as
txt extension, but it didn't convert back to text then either. If I
misinterpreted your instructions, please clarify. Again, thanks for
responding.
 
K

Kevin Spencer

Hi Emily,

That's not a text file. It's a binary file. Thos boxes and squiggles are
characters that your text editor is interpreting the binary data as. Let me
explain a bit, and see if this helps.

Everything in a computer is stored as 1s and 0s. Everything. That is why a
computer is called "binary." Binary means Base 2. Decimal numbers , such as
the type of numbers that you and I use every day, are called "decimal"
because they are Base 10 numbers. In Base 10 numbers, there are 10 digits,
0 - 9. In Base 2 numbers, the kind that the computer uses, there are 2
digits, 0 - 1. This is because a computer has billions of microscopic
transistors inside it that do the calculating. A transistor is basically a
switch, like a light switch. If the switch is off, its value is 0. If the
switch is on, its value is 1.

Any number can be represeted using 2 digits, but since there are only 2, you
need more places to represent higher numbers. In Base 10 numbers, the number
10 requires 2 digits to represent because 9 is the highest single digit in
the numbering system. In Base 2, the number 10 requires 4 digits to
represent (1010), as 1 is the higest single digit in the numbering system.
In Base 10, each "column" represents an exponent of 10: 1s, 10s, 100s, etc.
In Base 2, each "column" represent an exponent of 2: 1s, 2s, 4s, 8s, etc.

Because of this, and for the purpose of making things a little easier, a
byte of data in a computer is 8 digits in length, and can represent any
number from 0 (00000000) to 255 (11111111).

Okay, now for the part that relates to your problem. If everything
(including text) in a computer is nothing but 1s and 0s, how does the
computer know how to read it, and translate it into something meaningful to
you and I, mere humans? This is done via the file extension. The file
extension tells the operating system what kind of data is in the file (one
big long string of 1s and 0s), and how to interpret it. So, let's say the
file contains the following:

10001010001110111010100111010111011010010001100101001011

What the computer does is look at the file extension, which says ".txt" and
it says to itself, "Self, this is a text file. Therefore, I will break the
bytes up into chunks of the size of a character, and read it as a character
to the user." If the file has a .jpg extension, the computer says to itself
"Self, this is an image file. It contains pixels. So I will break the bytes
up into chunks the size of a pixel, and read it as an image (a whole bunch
of pixels of different colors) to the user.

So, the real question is, what IS the type of file you're looking at? If you
don't know, you can't give it the proper extension to clue in your computer.
Since you're seeing all those squiggly characters in your text editor (which
the OS opened it in, since it had a .txt extension), it is obviously NOT a
text file. So, you could give it a .jpg extension, and try to open it
(again, the computer will open it in a JPG editor). If that doesn't work,
try giving it a .gif extension to see whether it turns out to be a GIF. And
so on.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
M

Murray

And - what happened to those text files? Or were there ever text files?
Were these, perhaps, bits of text saved as a graphic? What do you see when
you open these files in your graphics editor?
 
K

Kevin Spencer

And where did they come from? I can add one other thing to my advice: DON'T
give them a .exe, .com, or .pif extension and try to open them!

--
;-),

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
S

Steve Easton

Usually you can right click one and open it in notepad.
The actual extensions will "often" display at the beginning or end of the page.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
R

Rick Budde

What are attempting is to sew a Gucci label in your
handbag from Sears. It's still a Sears handbag. Just
changing the extension on a filename does NOTHING to the
actual file.

You might want to enroll in some VERY basic computer
classes.
 
Top