1. A non-transitory computer-readable storage medium encoded with a computer program comprising instructions that, when executed by data processing apparatus, cause the data processing apparatus to perform operations comprising: identifying, for a feature, a vertex that is aligned with a non-integer pixel location of a corresponding image; determining that a dimension of the feature associated with a directional component of the feature is to be rounded; accessing a rounding rule associated with the feature, the rounding rule specifying a rounding factor by which a size ratio between contrast bands of the feature can be maintained; and rounding the feature in accordance with the identified rounding rule to generate a rounded feature, such that the at least one vertex is aligned with an integer pixel location of the corresponding image.