An image compression standard, lossy compression, uses the discrete cosine transform. The quality can vary greatly depending on the compression settings. JPEG can have millions of colors and are often used for photographs and very complex images. JPEG files are cross-platform and will work on all computer types. JPEG images have the .jpg, .jpe, or. jpeg extension.