# draw/image
Draw an image — unified blit for panels and surfaces. GL hosts render a
hi-res texture; ANSI hosts fall back to half-block cells.
## Syntax
[draw/image $target $col $row $w $h $src ?opts]
## Parameters
- `$target` — panel DrawContext (coords in cells) or surface id (coords in pixels)
- `$col` / `$row` — top-left position
- `$w` / `$h` — size (cells for panels, pixels for surfaces)
- `$src` — image path (PNG/JPEG/WebP), a `%PixelBuffer{}`, or an `image/*`
Image value
- `$opts` — optional map:
- `:refresh true` — re-upload the pixel buffer every frame (video pattern)
- `:zoom`, `:pan-x`, `:pan-y` — half-block view on ANSI hosts
## Returns
`true` when the image was rendered. On GL hosts textures/buffers load
asynchronously: the first call for an uncached source queues the load and
returns `false` — draw again on the next frame, when the cached texture is
ready. The ANSI path renders synchronously.
## Examples
defmethod MyApp draw ($self $ctx) { def b [draw/bounds $ctx] [draw/image $ctx 0 0 $b~width $b~height "/path/to/image.png"] }
## See Also
`draw/image-dims`, `draw/image-preview`, `draw/canvas`, `image/pixel-buffer`,
`image/open`