Kurt Griffin <[EMAIL PROTECTED]>
> 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.
Hi Kurt,
You can compare images using the "=" operator.
Here's a quick test:
1. Create a bitmap image in cast slot 1
2. In the Message window, type
x = member(1).image.duplicate() -- so it doesn't change when you edit
put member(1).image = x
-- 1
3. Now change a single pixel in the right half of your bitmap image
4. In the Message window, type
put member(1).image = x
-- 0
5. The "before" and "after" images are no longer the same. But you can
determine that at least half of both images is still identical:
y = x.crop(rect(0, 0, x.width / 2, x.height))
z = member(1).image.crop(rect(0, 0, x.width / 2, x.height))
put y = z
-- 1
You could use this halving technique repeatedly to home in on areas that
have changed.
Is this what you are looking for?
Cheers,
James
[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!]