could you just use the before() and after() utlities below instead of actually comparing pixel position?  Might be faster.