added white background if format is jpg