Converting Hexadecimal in Binary

Alejandro Tejada capellan2000 at yahoo.com
Sun Jan 11 00:46:36 EST 2004


Sat, 10 Jan 2004
Dar Scott wrote:

> > What do you mean with expanded?

> The header in the P6 format includes size data.  It
> can be pulled from the export, perhaps with the 
> same regex that gets the binary data or 
> marks the location of the binary data.

Please check this handler to convert
binary data in hexadecimal. I feel it slow.

In a new stack:

1- Import an image (embedded, not linked).
2- Create a field.
3- Create a button and put this handler in it:

local v1

on mouseUp
  
  put the ticks into zxcv
  
  put the imagedata of img 1 into asd
  delete char 1 of asd
  -- the first char of the imagedata is the alphadata
or maskdata
  
  repeat with i = 1 to length(asd) step 4
    get binaryDecode("H*", char i to i+2 of asd, v1)
    add 1 to zxc
    if zxc mod 10 = 0
    then
      put toupper(v1) & return after fldhex
      -- the function toUpper converts lowercase in
uppercase
    else
      put toupper(v1) after fldhex
    end if
  end repeat
  put fldhex into fld 1
  put ((the ticks - zxcv) / 60) && "seconds to create
the hexadecimal data from binary imagedata"
end mouseUp

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