1. A method for compressing digital image data in a computing device, the method comprising: dividing an image into sub-regions; determining a maximum number of template codes for representing each sub-region, each template code uniquely identifying a template pattern in a dictionary including a plurality of predetermined template patterns; associating each of a plurality of the sub-regions with a plurality of template patterns, each of which individually does not match the sub-region, but which when combined together more closely match the sub-region; generating a compressed data set for the image, in which each sub-region is represented by up to the maximum number of template codes uniquely identifying the associated plurality of template patterns; and transmitting for each sub-region the up to the maximum number of template codes from the compressed data set, wherein the maximum number of template codes is a dynamic parameter adjustable based on the bandwidth available for transmitting.