11 Images
<image> support loads a local file or a base64 data: URI into a
bitmap%, then fits it into its declared viewport the same way a
nested viewBox does (reusing compute-viewbox-matrix). Remote
http(s):// (or any other URI scheme) references are deliberately never
fetched —
procedure
(load-image-bitmap href) → (or/c (is-a?/c bitmap%) #f)
href : string?
A data:image/...;base64,... URI is decoded directly. Anything matching
scheme:// for any scheme is treated as a remote reference and always
returns #f —
(load-image-bitmap "data:image/png;base64,iVBORw0KGgo...") (load-image-bitmap "icon.png") ; relative to current-svg-base-dir, if set (load-image-bitmap "https://example.com/x.png") ; #f -- never fetched
A bitmap loaded via load-image-bitmap and drawn onto a fresh dc:

parameter
(current-svg-base-dir) → (or/c path? #f)
(current-svg-base-dir base-dir) → void? base-dir : (or/c path? #f)
(parameterize ([current-svg-base-dir (string->path "/home/user/icons/")]) (load-image-bitmap "logo.png")) ; resolves to /home/user/icons/logo.png