🍋
Menu
Image

Vector Graphics

Vector Graphics (Resolution-Independent Graphics)

Vector graphics represent images as mathematical descriptions of geometric shapes, paths, and text rather than pixel grids. They scale to any size without quality loss, making them ideal for logos, icons, and illustrations.

Technical Detail

Vector formats store shapes as Bezier curves defined by control points. SVG uses XML path data (M, L, C, Z commands), while PDF and EPS use PostScript operators. Rendering requires rasterization at the target resolution.

Example

```javascript
// Resize image using Canvas API
const canvas = document.createElement('canvas');
canvas.width = 800;
canvas.height = 600;
const ctx = canvas.getContext('2d');
ctx.drawImage(img, 0, 0, 800, 600);
canvas.toBlob(blob => {
  // Download resized image
  saveAs(blob, 'resized.png');
}, 'image/png');
```

Related Tools

Related Terms