Prevent viewport from moving out of image bounds