Images and Image Data

Scott Raney raney at metacard.com
Fri Jul 5 15:10:01 EDT 2002


On Fri, 5 Jul 2002 PEChumbley at aol.com wrote:

> Would this run faster?

Definitely, but there's one other optimization: Don't call
binaryEncode so much, it's pretty expensive:

> on mouseUp
>   put fld "data" into tOrigData
>   set the itemdelimiter to TAB
>   create image
>   put it into tID
>   set the width of tID to tWidth
>   set the height of tID to tHeight

local tbp, tgp
put binaryEncode("CCCC",0,0,255,0) into tgp
put binaryEncode("CCCC",0,0,0,255) into tbp

>   put empty into iData
>   repeat for each line l in tOrigData
>     repeat for each item i in l

      if i > 0 then put tgp after iData ---make green
      else put tbp after iData  --- make blue

>     end repeat
>   end repeat
>   set the imageData of tID to iData
> end mouseUp

Regards,
  Scott

> Philip Chumbley

********************************************************
Scott Raney  raney at metacard.com  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...





More information about the metacard mailing list