🍋
Menu
Image

Lossless Compression

Lossless Compression (Reversible Data Reduction)

Lossless compression reduces file size without discarding any image data. The original image can be perfectly reconstructed from the compressed file. PNG, TIFF (with LZW), and WebP lossless use this approach.

Teknik Detay

Lossless algorithms exploit statistical redundancy: PNG uses DEFLATE (LZ77 + Huffman coding) with row-level prediction filters. Typical compression ratios range from 2:1 to 10:1 depending on image complexity.

Ornek

```javascript
// Image compression via Canvas
canvas.toBlob(
  blob => console.log(`Size: ${(blob.size/1024).toFixed(0)} KB`),
  'image/jpeg',
  0.8  // quality: 0.0 (smallest) to 1.0 (best)
);

// WebP output (25-34% smaller than JPEG)
canvas.toBlob(cb, 'image/webp', 0.8);
```

Ilgili Formatlar

Ilgili Araclar

Ilgili Terimler