Image Interpolation
Image Interpolation (Pixel Resampling)
Image interpolation is the method used to calculate new pixel values when resizing an image. Different algorithms (nearest-neighbor, bilinear, bicubic, Lanczos) trade speed for quality when scaling images up or down.
๊ธฐ์ ์ธ๋ถ์ฌํญ
Nearest-neighbor copies the closest pixel (fastest, blocky). Bilinear averages 4 neighbors. Bicubic uses 16 neighbors with cubic weighting. Lanczos uses a sinc-based windowed filter for the sharpest results.
์์
```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);
```
๊ด๋ จ ๋๊ตฌ
C
Compress Image
R
Resize Image
C
Crop Image
R
Rotate Image
F
Flip Image
C
Convert Image
W
Watermark Image
S
SVG to PNG
I
Image to Base64
R
Round Corners
A
Add Border
I
Image Filters
A
Adjust Image
B
Blur Image
S
Sharpen Image
M
Make Square
์ด
์ด๋ฏธ์ง ๊ทธ๋ ์ด์ค์ผ์ผ ๋ณํ
์ธ
์ธํผ์ ์ด๋ฏธ์ง
์ด
์ด๋ฏธ์ง ํฝ์
ํ
์ด
์ด๋ฏธ์ง ๋ฉํ๋ฐ์ดํฐ ์ ๊ฑฐ