A method for processing image data for data compression, said image data comprising pixels and representing a two-dimensional screened image, said image data defining successive input scan lines, including a first scan line, a second scan line immediately preceding said first scan line, and a third scan line preceding said first scan line, said method comprising the steps of:
- establishing said first scan line as a current scan line;
- and
- selecting a reference scan line while examining said image data on the bases of the size or frequency of occurrence of said pixels of said image data, said reference scan line being selected from among said preceding second scan line and said preceding third scan line, and said current scan line and said reference scan line being for use in connection with a two-dimensional image coding process wherein data compression is directly related to a pattern relationship between said current scan line and said reference scan line.