Draw gray background when saving image if background is not valid