An image compressor in computer graphics is a piece of software or, much more rarely, a piece of hardware that takes a two-dimensional (2D) digital image and reduces the size of the image file on a storage device. Depending on the type of application, an image compressor can offer the user a number of options for compressing the image data, from different file formats to control of the different variables within a given compression algorithm. Some image compression programs are designed exclusively to convert, compress and write images, sometimes in large batches, while at other times the compressor can be an integrated component of an image editing application. In some instances, especially when dealing with digital video editing, an image compressor could be integrated into a piece of hardware so images can be compressed and decompressed in real time as needed.
As a standalone application, an image compressor can contain an array of features related to increasing the efficiency of the compression or helping to automate the compression of a series of images. One feature that can be useful is a predictive compression display, in which the estimated final file sizes for an image are displayed to show which compression algorithm would be most effective for a given file. This can be important because some images, such as flat illustrations, can achieve a higher compression rate with some algorithms, while a photograph will do better with others.
Batch processing is another feature that often is seen in an image compressor. This is useful when many digital images are created in a format — raw, uncompressed or otherwise — that cannot be immediately used for a given purpose. Through the use of batch processing, entire directories of images can easily be converted and compressed without additional user input.
Regardless of whether an image compressor is part of a suite or is a standalone application, it frequently offers options to fine tune the type of compression that will be used. This can affect the final image by allowing the user to choose image quality over file size or file size over color depth. Certain file formats have multiple compression methods that can be used, and an image compressor can give the user a chance to choose which one to use.
An image compressor also can sometimes be used to change or add metadata within an image file. This can include information such as the author, company of origin or date of creation. It also might include digital watermarks or, in certain instances, digital rights management (DRM) information.