scicloj / kindly-noted

A common space for notes following the Kindly convention
5 stars 1 forks source link

Unclear how to use kindly/image to display a .webp file #5

Open holyjak opened 2 months ago

holyjak commented 2 months ago

Hello! I have supposed (k/image ["notebooks/geoplot.webp"]) to work, but it fails with

IllegalArgumentException: No matching method write found taking 3 args
at scicloj.clay.v2.util.image$write_BANG_ invoke "image.clj" 8
at scicloj.clay.v2.item$image invoke "item.clj" 224

Also, the image docs read example: https://raw.githubusercontent.com/scicloj/graphic-design/live/icons/Kindly.svg but that is not true. (k/image "string...") won't work...

Clay version: 2-beta15

holyjak commented 2 months ago

I now realize I should perhaps just used hiccup...

daslu commented 2 months ago

Hi @holyjak, this is correct. At the moment, a path does not work for kind/image. But it is a good idea to extend it.

Where are you seeing the wrong image docs you mentioned above?

holyjak commented 2 months ago

At scicloj.kindly.v4.kind/image:

(defn image
  "display-as: an image
example: At the moment, java BufferedImage objects are supported."
...