Re: Masking
- Posted by "Lucius L. Hilley III" <L3Euphoria at bellsouth.net> Nov 09, 2003
- 869 views
This has been tested -- include ofind.e procedure display_image2(sequence xy, sequence img) integer x, y, s, e, li sequence img_mask x = xy[1] y = xy[2] img_mask = (img = 0) position(2, 1) for Y = 1 to length(img) do li = length(img_mask[Y]) e = 0 s = find(0, img_mask[Y]) while (s) and (li > e) do e = ofind(1, img_mask[Y] , s+1) if (e) then e -= 1 else e = li end if pixel(img[Y][s..e], {x+s, Y+y}) s = ofind(0, img_mask[Y], e+1) end while end for end procedure Lucius L. Hilley III - Unkmar ----- Original Message ----- From: "Stewart MacKenzie-Leigh" <stewartml89 at msn.com> To: <EUforum at topica.com> Sent: Saturday, November 08, 2003 02:30 PM 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! > >