Hi all,
A friend of mine works at a company that uses Director to do presentation
CDs and kiosks. They don't really utilize the power of lingo to make
utilities that will do mundane tasks for them. One such task is cropping
images - for example, you want to do a frame based animation of the cursor
moving around the screen and clicking on menus and such. So, you take 100
screen grabs. Then you want to crop each screen grab so that only the
changing part of the image is retained, along with the regpoint.
I've written a utility that will import the screen grabs, compare them
against a key image, and crop each so that only the changed pixels remain.
Now I'm looking to optimize it.
Right now, it compares each pixel in the key image to each pixel in the
image to be cropped, and if they don't match, the pixel x,y is stored. I
then sort the x list and the y list, and use copyPixel to "white-out" all of
the pixels outside of the rect that contains the "changed" portion of the
image. I did an alternate that whites out every "same" pixel, but that one
takes twice as long to run.
It takes around 30 seconds per image (800x600, 32 bit), so I'm trying to
work out a targeted search approach. In other words, sample blocks of an
image, and zero in on blocks that have different pixels from the source, and
do a more refined comparison. This is my first real attempt at imaging
lingo, so I'm not sure where to find speed gains.
If anyone has some ideas about where to take this, let me know. If not, I
will be posting the open source on my site when I've got it ready, for
anyone that would like such a utility.
-Kurt
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]