hi, i found this code , it does something very similar that what im
trying to do.

But there are something i cannot  understand :that line
(destImg[val/128+1].setPixel(i, j, pixelVal)) 

why is 128? can anybody explain me that???

thanks

on doImages
img=member("mrt").image.duplicate()
imgRect=img.rect
imgWidth=imgRect.width
imgHeight=imgRect.height

destImg=[]
repeat with i=12 to 17
destImg[i-11]=image(imgWidth, imgHeight, 32)
end repeat

repeat with i=0 to imgheight
repeat with j=0 to imgwidth
pixelval=img.getPixel(i, j)
if pixelval<>0 then
val = pixelval.red+pixelval.green+pixelval.blue
end if
destImg[val/128+1].setPixel(i, j, pixelVal)
end repeat
end repeat

repeat with i=12 to 17
member(i).image.copyPixels(destImg[i-11], imgRect, imgRect)
end repeat
end






On Mon, 27 Dec 2004 21:11:33 -0500, "KLGC Studio" <[EMAIL PROTECTED]>
said:
> Look for articles and info on IL (Imaging Lingo) and study the 
> examples.  All very doable, but more than a few quick snippets of code. 
> 
> pun chik wrote:
> 
> >hi list, im new here, i have a question:
> >im trying to do something like the magic wand tool from photoshop in
> >lingo, the idea is to select sections of an image and copy them in a new
> >cast member. Is that possible?
> > 
> >
> >do anybody have tried that ?
> >
> >any hint would be appreciated
> >
> >thanx
> >
> >punchik
> >  
> >
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
> [email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L
> is for learning and helping with programming Lingo.  Thanks!]
-- 
  pun chik
  [EMAIL PROTECTED]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to