Fix dimensions of mouse cursor thanks to Peter W

Use temporary buffer size rather than original image size.

Original issue: https://bitbucket.org/kevglass/slick/issue/40/using-wrong-variable