Re: Masking
- Posted by "Daniel Kluss" <codepilot at netzero.net> Nov 08, 2003
- 607 views
Here is a way try this, take the image and compile it like this this does only one line sequence line,comp atom clear comp={} line=your line clear=0 for i = 1 to length(line) do if line[i]=CLEARCOLOR then clear+=1 else comp&=clear&line[i] clear=0 end if end for And to display a compiled line do this atom x,y x=your x y=your y for i = 1 to length(comp) by 2 do x+=comp[i] pixel({x,y},comp[i+1] end for THATS ALL FOLKS Daniel Kluss ----- Original Message ----- From: "Stewart MacKenzie-Leigh" <stewartml89 at msn.com> To: <EUforum at topica.com> Sent: Saturday, November 08, 2003 11:30 AM Subject: Masking > > > Is there a fster way to display a bitmap on the screen without the pixels > which are the mask color, other than plotting each color individually in a > loop? > > this is the code im using at the moment: > > for y = 1 to length(img) do > for x = 1 to length(img[y]) do > if img[y][x] != MASK_COLOR then > pixel(img[y][x], {imgX + x, imgY + y}) > end if > end if > end for > > this is too slow for what i am doing. > > > thanks in advance > > StewartML > > > > TOPICA - Start your own email discussion group. FREE! > >