Rasterization
Rasterization (Vector-to-Pixel Conversion)
Rasterization is the process of converting vector graphics (mathematical shapes) into raster images (pixel grids). This is necessary when displaying SVG, PDF, or font glyphs on pixel-based screens or exporting to bitmap formats.
ๆๆฏ็ป่
Rasterization involves scan-line algorithms that determine which pixels fall inside vector paths, then applies anti-aliasing to smooth edges. Sub-pixel rendering uses RGB subpixels for finer detail on LCD displays.
็คบไพ
```javascript
// Rasterization: processing with Canvas API
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
ctx.drawImage(sourceImage, 0, 0);
const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
// Process pixels in imageData.data (RGBA array)
```
็ธๅ ณๆ ผๅผ
็ธๅ ณๅทฅๅ ท
ๅ
ๅ็ผฉๅพ็
่ฐ
่ฐๆดๅพ็ๅคงๅฐ
่ฃ
่ฃๅชๅพ็
ๆ
ๆ่ฝฌๅพ็
็ฟป
็ฟป่ฝฌๅพ็
่ฝฌ
่ฝฌๆขๅพ็ๆ ผๅผ
ๅพ
ๅพ็ๆทปๅ ๆฐดๅฐ
S
SVG ่ฝฌ PNG
ๅพ
ๅพ็่ฝฌ Base64
ๅ
ๅ่งๅค็
ๆทป
ๆทปๅ ่พนๆก
ๅพ
ๅพ็ๆปค้
่ฐ
่ฐๆดๅพ็
ๆจก
ๆจก็ณๅพ็
้
้ๅๅพ็
่ฃ
่ฃๅชไธบๆญฃๆนๅฝข
G
Grayscale Image
S
Sepia Image
P
Pixelate Image
S
Strip Image Metadata