What are you exactly trying to do? some things can better be done with copypixels and some other creative use of imaging lingo features. Get and set pixel is very slow. Caching the image objects will speed things up, but not to such an extend that it will enable you to do things realtime.
J. -----Oorspronkelijk bericht----- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Christoffer Enedahl Verzonden: woensdag 14 juli 2004 13:55 Aan: [EMAIL PROTECTED] Onderwerp: Re: <lingo-l> get and set pixel >I am using this code similar to this : > >repeat with xx = 1 to 450 > repeat with yy = 1 to 400 > rgbval = member("firstImg").image.getPixel(xx, yy) > -- some calculations here and then > member("secondImg").image.setPixel(xx,yy, newrgbval) > end repeat >end repeat > >This is all working fine, except how slow it is. It helps to cache slow stuff. like getting a member is slow. And getPixel and setPixel is slow aswell. for normal image copy stuff, check copyPixels in the manual, and some inks can be useful. if you need to work down at pixellevel I would recode the loop something like this: vImg1 = member("firstImg").image vImg2 = member("secondImg").image repeat with xx = 1 to 450 repeat with yy = 1 to 400 rgbval = vImg1.getPixel(xx,yy) -- some calculations here and then vImg2.setPixel(xx,yy, rgbval) end repeat end repeat HTH/Christoffer [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!] [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!]
