Create bitmap containing text.
Hi everyone,i'm just a beginner and i know very little about coding,but since i'm an addict i always find up akward situations to solve so to make my life needlessly complex.
Anyway this is what i have done in the first place:
Took a file text,wrote in this:
Opened the file text with a hex editor with this result:
Converted to decimal:
Applied the decimal codes in a 2x1 BMP image as if they were RGB colors. (which is 2 pixels)
Saved the image.
Opening the image with a hex editor showed this:
As i'm kinda amused of the result,i'd want to have a program that given a text converts it into a bmp image containing the text (not the inverted one D:)
So it has 3 steps:
1) Take some text and convert it to hex
2) Invert the string just obtained
3) Export to .bmp
The first step is done with this site ATM:
Convert String To Hexadecimal Online
But i'd be really cool if it could be done with the program.
The second part is done with this little code:
Code:
cin>>code;
code = string ( code.rbegin(), code.rend() );
cout<<code;
Now the real issue is the third part.
I have an inverted string that contains hex code,i'd need the code to convert it into RGB for a .bmp file.
in case there are missing characters to complete the RGB (like if i have 10 bytes,like: FF FF FF FF FF FF FF FF FF 00) then there should be additional spaces at the beginning.
Would anyone be so awesome to actually make such thing for me?
I've been googling around all day but had no luck :/
P.s. step 1 would also be amazing :3
Thanks in advance! :D