Compression removes representational redundancy. Lossy codecs also remove detail they predict people are less likely to notice.

Lossless compression

Lossless methods reorganize recurring patterns so the exact decoded pixels can be recovered. PNG filtering and entropy coding are examples. Complex photographic noise is hard to shrink losslessly.

Lossy compression

Lossy encoders transform pixels and quantize information. Lower quality generally removes more detail and leaves fewer symbols to store. The useful quality range depends on the image.

Dimensions are a powerful control

Cutting width and height in half leaves roughly one quarter of the pixels. For extreme targets, modest resizing can preserve a cleaner-looking result than pushing codec quality to its floor.