Skip to content

zigar.image.WebImage(acc, format).setPixel(self, T, x, y, pixel)

Chung Leong edited this page Jul 28, 2026 · 2 revisions

JavaScript | PHP


Set a pixel at the given location.

T must be a floating point vector. Its length indicates the desired number of channels.

Arguments:

  • self: @This()
  • T: @Vector(4|3|2|1, f16|f32|f64)
  • x: usize
  • y: usize
  • pixel: T

Return value:

  • void

Note:

Calling this function when acc = .ro results in a panic.


WebImage(acc, format) | getPixel(self, T, x, y)

Clone this wiki locally