add download_image, refactor import_image

This commit is contained in:
GenevensiS
2025-12-28 13:59:23 +01:00
parent 3d0f21d483
commit 5c1b7b9dfc
13 changed files with 157 additions and 86 deletions
+13
View File
@@ -0,0 +1,13 @@
Function: download_image
--Usage--
> download_image(image_url)
Load an image from the internet.
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] URL of the image to load
--Examples--
> new_card([image: download_image("https://cards.scryfall.io/art_crop/front/c/6/c634273a-94b0-4104-9d10-ae522ece1fc7.jpg?1755341328"), name: "Adagia, Windswept Bastion"])
+1
View File
@@ -101,6 +101,7 @@ These functions are built into the program, other [[type:function]]s can be defi
| [[fun:dimensions_of]] Get the width and height of an image.
| [[fun:symbol_variation]] Render a variation of a [[type:symbol]].
| [[fun:import_image]] Load an image from outside the data folder.
| [[fun:download_image]] Download an image from a URL.
| [[fun:built_in_image]] Return an image built into the program.
! Cards <<<