QPix Command Reference |

## Compression

Image compression is the process of reducing the size of images. Compressed images require less storage space when saved on disk, as well as less RAM when handled in memory (although they must be decompressed for displaying).

QuickTime provides image compression and decompression services through software components commonly called codecs (compressors/decompressors).

Each codec implements a specific compression method or algorithm. Some of them implement lossless compression: once compressed with such a lossless codec, an image can be reconstructed without loss of quality from its compressed form.

In favor of better storage savings, however, most codecs slightly change certain image pixels to further reduce size and this will result, at least theoretically, in loss of image information. A lossy codec carefully chooses which image data to omit, taking into account the human perception of visual images, so that it fools the user into seeing what appears to be the original image.

Note: 4D includes commands for image compression (COMPRESS PICTURE, COMPRESS PICTURE FILE and LOAD COMPRESS PICTURE FILE), but they don't work on Windows as of 4D v6.5. Also, QPix offers more control over the compression procedure and includes the QPx_GetCodecList and QPx_DoCodecSettingsDialog commands that have no equivalents in 4D's language.

QPix gives access to QuickTime's compression services throught the following commands:

QPx_CompressPicture | Compresses a picture variable
QPx_CompressPictureFile | Compresses a PICT file in place (on disk)

QPix © Escape Information Services
Generated by QDoc 2.6 on Thu, 2 May 2002 00:49:52 +0300