modify halftoning functions