🍋
Menu
Image

Canvas

Canvas (Image Working Area)

In image editing, the canvas is the total working area that defines the boundaries of the image. Resizing the canvas adds or removes space around the existing image content without scaling it.

तकनीकी विवरण

Canvas operations modify image dimensions without resampling pixel data. Extending the canvas adds pixels in a specified fill color or transparency, while reducing it crops edge pixels.

उदाहरण

```javascript
// Canvas: 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)
```

संबंधित टूल्स

संबंधित शब्द