Picture to .txt and vice versa
Posted: Sun Oct 30, 2011 1:07 am
Hi to all...
Someone, somewhere (maybe even here, I really don't remember, I've tried to find the post, to see if he had finished the program, but without success) had the idea to make a program that will convert a picture into a .txt file (NOT to make picture inside txt as with ASCGEN2 and similar programs, but to "translate" each pixel of picture to a text code).
I would like to make something similar, almost the same. For example, a pixel with color code #FF0000 to be converted to text [#FF0000], or some random combination of letters, unique for every color (e.g. #FF0000 pixel to text [LE#h:IF.]), and so for every pixel of the picture.
Then I want to save it as .txt , and when I open that .txt file with notepad to see simply the "code" of the picture, but when I run it with my program, to convert it back to normal picture, as it was before (without change of width, height,etc).
It would be a simple program with 1 textbox, 1 picturebox, and buttons to open, convert, and save files. That's how I imagine the program, but I don't know how to code it.
I hope that I explained correctly what I want to do.
Of course, all credits would go to the person who makes the code, and to the person whose idea this originally was.
PS. USMAN55 TRIED TO FIND HIS OLD PROGRAM, BUT WITHOUT SUCCESS, SO THE REQUEST IS STILL ON.
Someone, somewhere (maybe even here, I really don't remember, I've tried to find the post, to see if he had finished the program, but without success) had the idea to make a program that will convert a picture into a .txt file (NOT to make picture inside txt as with ASCGEN2 and similar programs, but to "translate" each pixel of picture to a text code).
I would like to make something similar, almost the same. For example, a pixel with color code #FF0000 to be converted to text [#FF0000], or some random combination of letters, unique for every color (e.g. #FF0000 pixel to text [LE#h:IF.]), and so for every pixel of the picture.
Then I want to save it as .txt , and when I open that .txt file with notepad to see simply the "code" of the picture, but when I run it with my program, to convert it back to normal picture, as it was before (without change of width, height,etc).
It would be a simple program with 1 textbox, 1 picturebox, and buttons to open, convert, and save files. That's how I imagine the program, but I don't know how to code it.
I hope that I explained correctly what I want to do.
Of course, all credits would go to the person who makes the code, and to the person whose idea this originally was.
PS. USMAN55 TRIED TO FIND HIS OLD PROGRAM, BUT WITHOUT SUCCESS, SO THE REQUEST IS STILL ON.