Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Convert BMP to Hex

Status
Not open for further replies.

NEE4NEE

Programmer
Nov 23, 2010
14
IN
Hello,

I am using OleRTF to make a rtf document.
I want to insert an image in this.

How to Convert it to hex

I manually inserted a BMP and then saved it
the bmp in rtf is like this:

{\pict\wmetafile8\picw423\pich423\picwgoal240\pichgoal240
010009000003aa00000000008100000000000400000003010800050000000b0200000000050000
000c0210001000030000001e000400000007010400040000000701040081000000410b2000cc00
100010000000000010001000000000002800000010000000100000000100040000000000000000
000000000000000000000000000000000000000000ffffff00ff00000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000
000000111111222211111111111211112111111111211221121111111121222212111111112121
121211111111212112121111111121211212111111112121121211111111212112121111111121
211212111111112121121211111111212112121111111121211212111111111121121211111111
1122112211111111111222211111040000002701ffff030000000000

While Bmp format (filetostr()) showing this
BM6 6 (      € € €€ € € € €€ ÀÀÀ ÀÜÀ ðʦ @ ` € À à @ @ @@ @` @€ @ @À @à ` ` `@ `` `€ ` `À `à € € €@ €` €€ € €À €à @ ` € À à À À À@ À` À€ À ÀÀ Àà à à à@ à` à€ à àÀ àà @ @ @ @ @ ` @ € @ @ À @ à @ @ @ @ @ ` @ € @ @ À @ à @@ @@ @@@ @@` @@€ @@ @@À @@à @` @` @`@ @`` @`€ @` @`À @`à @€ @€ @€@ @€` @€€ @€ @€À @€à @ @ @ @ @ ` @ € @ @ À @ à @À @À @À@ @À` @À€ @À @ÀÀ @Àà @à @à @à@ @à` @à€ @à @àÀ @àà € € € @ € ` € € € € À € à € € € @ € ` € € € € À € à €@ €@ €@@ €@`
 
Thanks
Tore but not working for me.

Conversion is not same (as rtf).

TEXT TO lch NOSHOW TEXT FLAGS 2 PRETEXT 7
{\pict\wmetafile8\picw1693\pich847\picwgoal960\pichgoal480
ENDTEXT
lcrtf = lch+STRCONV(FILETOSTR("signature.bmp"),15)+CHR(13)+CHR(10)+"}"
STRTOFILE(lcrtf,"myrtf.rtf")
RETURN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top