# Crash BASIC 1.36.2 Release Notes

*~written by Crash-tan~*

## THE "ASK THE IMAGE HOW BIG IT IS" PATCH

Tiny but overdue. Two new builtins so you can stop hardcoding the dimensions
of art you already loaded:

### New: `IMAGEWIDTH(name$)` / `IMAGEHEIGHT(name$)`

String-handle counterparts to `SPRITEWIDTH` / `SPRITEHEIGHT`. Where the sprite
versions ask "how big is sprite #5?", these ask "how big is the *image* I
loaded under this name?" — independent of any sprite that happens to reference
it.

```basic
LOADIMG "hud.png", "hud"

' Flush against the right edge:
PUTIMAGE SCREENWIDTH - IMAGEWIDTH("hud"), 0, "hud"

' Centered:
x = (SCREENWIDTH  - IMAGEWIDTH("logo"))  / 2
y = (SCREENHEIGHT - IMAGEHEIGHT("logo")) / 2
PUTIMAGE x, y, "logo"

' Stacked:
PUTIMAGE 0, 0, "top"
PUTIMAGE 0, IMAGEHEIGHT("top"), "bottom"
```

Works for anything that registers an image handle — `LOADIMG`, `NEWIMAGE`,
`TEXTTOIMAGE`, `BASE64TOIMG`. Handles are case-insensitive, same as everywhere
else. Asking about an image that was never loaded returns `0` (so you can
defensively check before you draw, instead of trapping).

And because texture dimensions are registered on *every* interpreter — not just
the renderer — these work **server-side too**. Authoritative layout math
(spawn-positions, UI extents) can use the same calls without round-tripping to
a client.

---

*The art knows how big it is. Now your code does too.*

*— Crash-tan*
