# image/pixel-write
Copy RGBA bytes into a pixel buffer in place, optionally at a byte offset,
keeping the pixel pointer stable. CPU-only and thread-safe.
## Syntax
[image/pixel-write $buffer $bytes ?offset]
## Parameters
- `$buffer` — `PixelBuffer` from `image/pixel-buffer` or `image/load`
- `$bytes` — binary-safe string (e.g. from `ffi/read-bytes` or a worker stream)
- `offset` — byte offset into the pixel data (optional, default 0)
## Examples
set buf [image/pixel-buffer 320 240] [image/pixel-write $buf $rgba-bytes] # whole frame [image/pixel-write $buf $patch 4096] # sub-rect starting at byte 4096
## Returns
bool — true when the bytes fit (`offset + len(bytes) <= width * height * 4`);
false for a non-PixelBuffer, non-string bytes, or overflow. No error value is
returned.
## See Also
`image/pixel-buffer`, `image/load`, `image/dims`, `draw/image`