Patent ID: 6976026

Claim:
A computer-implemented method for automatically selecting a quality level when compressing each of a set of image files to produce compressed image files, so that a total size of the compressed image file does not exceed a predefined limit, comprising the steps of: (a) processing the image files to determine a maximally compressed file size for each image file when compressed to a predefined minimum quality level and to determine a nominal compressed file size when compressed to a nominal quality level, and to determine a weight for each image file based upon a high frequency energy content of the image file; (b) identifying image files of the set that are to be compressed with the predefined minimum quality level as a function of: (i) the maximally compressed file size of each image file when compressed to the predefined minimum quality level; and (ii) the weight of each image file; (c) for all other image files of the set that were not identified to be compressed with the predefined minimum quality level in step (b), determining a quality level for compressing the other image files so that each of the other image files is to be compressed to a desired size selected as a function of the weight of the image file and so that the total size of the compressed image files does not exceed the predefined limit; and (d) compressing the image files identified in step (b) with the predefined minimum quality level, and all of the other image files not identified in step (b) with the quality level that was determined in step (c).