1. A method for compressing digital images, comprising: receiving an input image having a dimension d and a target dimension constraint d t ; determining a number of resolution levels R for generating an image having corresponding dimension d r , wherein the difference between d r and d t is less than the difference between d r and the corresponding dimension of an image compressed at the next or the previous resolution level; determining the scale factor S as a function of R and the dimension d of the input image; scaling the input image in accordance with the scale factor S; and compressing the scaled input image with the R resolution levels for producing a compressed image including a lowest resolution image, wherein the lowest resolution image has a corresponding dimension that is substantially the same as d t .