No matching definitions.

notebook/image

src/notebook/image.tur

image hook, PNG encoding, and terminal image display.

defn

image-marker

(image-marker :cstr)

the stdout prefix used to signal an image path.

defn

image-hook-record-path

(image-hook-record-path [path :cstr])

record an image path via the stdout marker.

pathfilesystem path to the PNG file

0 (always)

(image-hook-record-path "/tmp/cell-3-plot.png")

Since: Phase NB11

defn

image-hook-install

(image-hook-install [session :int] :int)

no-op stub (capture is handled by session-eval).

sessionnotebook session handle (ignored)

0

(image-hook-install session)

Since: Phase NB11

defn

image-hook-take

(image-hook-take [session :int] :int)

no-op stub; image paths live in cell-output.image-paths.

sessionnotebook session handle (ignored)

0 (nil list; real paths are in cell-output returned by session-eval)

(image-hook-take session)

Since: Phase NB11

defn

png->data-url

(png->data-url [path :cstr])

read a PNG file and return a base64 data URL.

pathfilesystem path to a PNG file

A :cstr of the form "data:image/png;base64,<encoded>" on success, or "" if the file cannot be read.

(png->data-url "/tmp/plot.png")  ; => "data:image/png;base64,iVBOR..."

Since: Phase NB11

defn

image-display-tui

(image-display-tui [path :cstr])

render an image path in the terminal.

pathfilesystem path to a PNG file

0 (always; output is printed to stdout as a side effect)

(image-display-tui "/tmp/cell-3-plot.png")

Since: Phase NB11 (AN5: delegated to ansi/image; v0.1.2: sixel via tur-png)

Internal definitions
__img-result-handle