๐Ÿ‹
Menu
Image

Chroma Subsampling

Chroma Subsampling (Color Resolution Reduction)

Chroma subsampling reduces the color resolution of an image while preserving full brightness (luminance) detail. Human eyes are less sensitive to color changes than brightness changes, making this an efficient compression technique.

Detalhe tรฉcnico

Expressed as ratios like 4:4:4 (no subsampling), 4:2:2 (half horizontal color resolution), and 4:2:0 (quarter color resolution). JPEG typically uses 4:2:0, reducing file size by 50% compared to 4:4:4.

Exemplo

```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);
```

Formatos relacionados

Ferramentas relacionadas

Termos relacionados