摘要 |
Compressing an image 401 to a preset file size using statistical information obtained from a single subset of the image and an initial compression of the single subset. A representative subset portion of the image is selected that may be based in part on a clustering analysis of the image (such as k-means or centroid-based clustering) 405. The representative subset is then compressed 406, in one embodiment, twice, in order to obtain statistics useable for the entire image. A scale factor is then determined 408 that may be used in the quantization and for creating a Bit Rate Control (BRC) curve 409 that represents an amount of accumulated bits per Minimal Codec Unit (MCU). During the compression process, the BRC curve is used to prevent accumulating bits from over shooting a final preset file size target. The method can be used in JPEG compression to reduce the overall compression time by eliminating the need to carry out multiple compressions of the entire image to obtain a preset file size. |