sonicfactory #1 Just do a simple check if the X and Y values of the image are less than 0-image_width and 0-image_height, or greater than the screen resolution.