Traps are produced at color boundaries in a print page that is present in
the form of run-length encoded image data, by way of distance mapping.
Distances of the run lengths to an adjacent color are determined without
decoding the run lengths into a pixel matrix, and the traps are produced
on the basis of the distances thus determined. For this purpose, distance
vectors are determined for the starting point and for the end point of a
run length. The distance vectors are in each case recalculated from the
comparison with the distance vectors of adjacent run lengths. The new
values of the distance vectors replace the previous values of the
distance vectors if the magnitudes of the distances of the new values are
less than the magnitudes of the distances of the previous values.