Add some coordinate bounds checking to image.c