EP O 1 79 291 B1 .. . Description _ _ _ Field of the lnvention _ _ _ _ The invention relates to a method and an apparatus for processing bi-level._mage data which are 5 supplied from an image data supply means, such as an image scanner, before the supply of the b__-level image data to a data compressor. Prior An NIKKEl ELECTRONICS November 3, 1915, pp. 3_3_ describes a pre-process of __mage data which is Io adaptable to a run-length coding. In the anicle, black __mage data and wh__te image data of a reference l__ne and a coding line lcurrent PEL or scan line) are so re-arranged that the black image data, i.e. black b__ts. are grouped.into a left half of a new l__ne and the wh__te image data, i.e. white bits, are grouped into a r__ght half of the new line. The le_ half ìs called an A1 sequence and the r__ght half __s called the A2 sequence. And. a new, unconvent__onal codìng scheme for adapting the A1 and A2 sequence is funher required. 15 Although the anicle relates to a pre-processing of b__-level image data, the detail of the process for the re-arrangement of the __mage data of the an._cle differs essentially from that of the present invention. UhA_ 229 768 relates to the pre-processing of binarv image data supplied from an image supplv means in preparatìon for compression. The patent deals with a method for eliminating isolated spots in the image data wh.ich are considered as noise. Funhermore, the patent teaches a smooth__ng process to avoid . 2o. quantizing errors when scann__ng boundaries between black and wh__te areas. Transitions between black ' and wh__te areas are detected and the distances between lefE end transitions or right end transitions._n subsequent lines are changed to ach__eve smoothing by way of an al__gnment of trans__tions. As the distances are not compared to ranges which have been predefined with the purpose to facilitate the subsequent compression, the pre-process._ng scheme described in thís patent lacks flexibility, Although z5 it allows a better representat._on of scanned._mage details of special shapes, it does not essentially and generallv contribute to a facil._tated compression and to an essential reduct__on of compression data to be transmitted, It is, therefore, an object of the present __nvention to propose a method and an apparatus for pre- processìng binary image data to allow an __mproved compress__on of such data. 3o The method and the apparatus of the present invention are respectivelv defined in claims 1 and 7. The improved compression according _o the present invention._s achieved by a selective processing of d._stances of transìtions be_een black and white areas, in subsequent scanned l__nes. By putting the distances ìn relation to the boundaries of a predetermined range the d._stances can be reduced in a flexible way. For an appropr__ate choice ofthe boundaries ofthe range the compression coding scheme __s taken _into 35 consideration. Br__ef Descr__ption of the Drawings F._g. 1 shows an operat._onal flow chan of the pre-process in accordance with an embod__ment of the present invent__on. _o Fig. 2 shows an example of the two-d_imens__onal coding scheme. _5 _ _ 50 55 _ 60 . _ . 65 _ 2 _ .