{# canonical_base is the OWNING tenant's origin: all 16 Peasy domains serve the same catalogue, so a page rendered by a non-owner points its canonical at the owner instead of competing with it. Falls back to this site for static/self-owned pages. #}
🍋
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)
```

関連ツール

関連用語