Skip to content

Vibe coding a plugin? 😎 Teach your agent Modlumi first. Works with Claude Code, Codex, Cursor and more.

PluginImage

An image a plugin loaded with PluginContext.loadImage or PluginContext.createImage, for ToolView.image. It lasts until the plugin disposes of it or stops.

readonly height: number


readonly width: number

Pixels.

dispose(): void

Frees the image’s pixels; views no longer draw it.

void


pixels(): Uint8Array

A copy of the image’s pixels: four bytes of red, green, blue and alpha each, in rows from the top, such as for reading a heightmap.

Uint8Array


toPng(): Uint8Array

The image encoded as a PNG file, to write with PluginFile.writeBytes.

Uint8Array