- Set resolution to custom whenever the panel has no selection (wired,
failed, non-finite or loading) so a stale label cannot override width/height.
- Compute label megapixels with 1 MP = 1,048,576 px, matching the panel
header, with half-up rounding so Python and JS labels agree on ties.