# image/dims
Return the pixel dimensions of an `Image` or a `PixelBuffer` as
`%{ :w N :h N }`.
## Syntax
[image/dims $v]
## Parameters
- `$v` — an `Image` value (e.g. from `image/open`) or a `PixelBuffer`
(from `image/load` / `image/pixel-buffer`)
## Examples
set img [image/open "test/fixtures/images/test.png"] [image/dims $img] # → %{ :w 8 :h 6 } [get [image/dims $img] :w] # → 8 set buf [image/load "test/fixtures/images/test.png"] [image/dims $buf] # → %{ :w 8 :h 6 } [image/dims "not an image"] # → nil
## Returns
`%{ :w width :h height }` with numeric values, or `nil` when the argument is
not a live `Image`/`PixelBuffer` (wrong type, plain value, or a closed
resource).
## See Also
`image/format`, `image/resize`, `image/open`, `image/load`