Rand Stats

Image::Markup::Utilities

zef:antononcube

Image::Markup::Utilities

Raku package for functions that facilitate the import, export, and viewing of images in different Markup types of documents.

Installation

From GitHub:

zef install https://github.com/antononcube/Raku-Image-Markup-Utilities.git

From Zef ecosystem:

zef install Image::Markup::Utilities;

Usage examples

Import an image and display it:

use Image::Markup::Utilities;
my $img = image-import($*CWD ~ '/resources/RandomMandala.png', format => 'asis');
image-from-base64($img);

Remark: GitHub's Markdown renderer does not display the image imported above, but other Markdown rendering apps, like, One Markdown or Visual Studio Code do show the image.

Remark: If this Markdown file is converted into an HTML file, say, with "Markdown::Grammar", [AAp3], the image is seen any browser.


Implementation notes


References

Packages

[AAp1] Anton Antonov, Text::Plot Raku package, (2022-2023), GitHub/antononcube.

[AAp2] Anton Antonov, WWW::OpenAI Raku package, (2023), GitHub/antononcube.

[AAp2] Anton Antonov, Markdown::Grammar Raku package, (2023), GitHub/antononcube.

Videos

[AAv1] Anton Antonov, "Using Wolfram Engine in Raku sessions", (2022), YouTube/antononcube.