Working script.

It looks like there's still some antialiasing going on during the resize operation.