api: write xintensity and rawintensity using api_add_int().