Apparatus for encoding an N-dimensional array of data values representing the colour content of pixels of an image. The apparatus comprises a set of stores (3-5); and a processor (1). The processor is adapted to apply an invertable difference operator to an N-dimensional array of data values in one store in each of the N-dimensions starting from respective first positions in each dimension to generate an N-dimensional array of encoded data which is stored in another store. For at least one of the dimensions, the processor (1) generates and stores an additional data set to enable the original data values in that dimension to be reconstituted by applying the inverted difference operator to the encoded data in the store starting from a second position different from the corresponding first position.