Converting Hexadecimal in Binary
Alejandro Tejada
capellan2000 at yahoo.com
Fri Jan 9 14:48:59 EST 2004
Hi developers,
I use this handler to convert a jpg embedded in
an Adobe Ilustrator file (version 6 or 7) as
Hexadecimal data in a binary image within Runrev.
But it takes so long. Comments to make this faster
are welcome.
on mouseUp
put the ticks into zxc
show img id 1088
put fld hexadecimal into asd
replace return with empty in asd
put numtochar(0) after qwe
repeat until asd is empty
put numtochar(baseconvert(char 1 to 2 of
asd,16,10)) after qwe
put numtochar(baseconvert(char 3 to 4 of
asd,16,10)) after qwe
put numtochar(baseconvert(char 5 to 6 of
asd,16,10)) after qwe
delete char 1 to 6 of asd
put numtochar(0) after qwe
end repeat
delete last char of qwe
put chartonum(char -4 of qwe),chartonum(char -3 of
qwe),chartonum(char -2 of qwe),chartonum(char -1 of
qwe)
create img
set the height of it to fld imgheight
set the width of it to fld imgwidth
set the imagedata of it to qwe
hide img id 1088
put ((the ticks - zxc) / 60) && "seconds to create
the binary imagedata from hexadecimal data"
end mouseUp
I post this stack to download, so you could run
the code with the hex data:
<http://geocities.com/capellan2000/hexadecimal_to_binary.gz>
Thanks in advance.
al
=====
Visit my site:
http://www.geocities.com/capellan2000/
Search the mail list:
http://mindlube.com/cgi-bin/search-use-rev.cgi
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
More information about the use-livecode
mailing list