1. Apparatus for compressing digital data representing an input image, the data representing the input image as a matrix of picture elements (pixels), the apparatus comprising: processing means for processing the data representing the input image to generate data representing a segmented image having boundaries which correspond to boundaries in the input image; means for combining the data representing the segmented image with the data representing the input image to produce data representing a residual image, the residual image representing the input image minus the segmented image using a first quantity of data; first encoding means for losslessly encoding the data representing the segmented image to produce encoded segmented image data in a manner that allows the encoded segmented image data to be decoded without losing detail in the decoded segmented image; second encoding means for encoding the data representing the residual image to produce encoded residual image data which represents the residual image using a second quantity of data where the first quantity of data is greater than the second quantity of data; and means for combining the encoded segmented image data and the encoded residual image data to produce the compressed digital data.