1. A method for compressing a digital image in a computing device, the method comprising: dividing an image into a plurality of image sub-regions; selecting from a dictionary including a plurality of predetermined template patterns, each said pattern identified by a code, a template pattern for each sub-region that most closely matches one or more image features of that sub-region; and generating a compressed data set for the image, in which each sub-region is represented by a code identifying the template pattern selected therefor.