Make sure the size isn't negative when creating an image.