Digital Image processing has become ubiquitous in our daily life and the demands to produce and process images are ever increasing. Large amounts of space are required to store these images. Image compression techniques are in high demand as they allow reduction in this storage space. The basis for image compression, as is for most other compression techniques, is to remove redundant and unimportant data. Lossless image compression techniques retain the original information in compact form and do not introduce any errors when decompressed. In this paper, we discuss such a lossless technique using a data structure that we name "Generic Peano Pattern Mask Tree". It is an improvement over a previously discussed Lossless Image compression technique - "Peano Pattern Mask Tree". Both these structures are based on the data structure - Peano Mask Tree.