first steps towards image generation

This commit is contained in:
Norman Köhring 2023-05-26 14:04:46 +02:00
parent e6e0d5e633
commit 6f3979d6d0
6 changed files with 55 additions and 579 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "lib/ImageScript"]
path = lib/ImageScript
url = https://github.com/matmen/ImageScript.git

View file

@ -1,5 +1,11 @@
{
"imports": {
"/": "./",
"./": "./",
"std/": "https://deno.land/std@0.189.0/",
"lib/": "./lib/"
},
"tasks": {
"dev": "deno run --watch main.ts"
}
}
}

588
deno.lock
View file

@ -1,583 +1,15 @@
{
"version": "2",
"remote": {
"https://deno.land/std@0.176.0/fmt/colors.ts": "938c5d44d889fb82eff6c358bea8baa7e85950a16c9f6dae3ec3a7a729164471",
"https://deno.land/std@0.176.0/testing/_diff.ts": "1a3c044aedf77647d6cac86b798c6417603361b66b54c53331b312caeb447aea",
"https://deno.land/std@0.176.0/testing/_format.ts": "a69126e8a469009adf4cf2a50af889aca364c349797e63174884a52ff75cf4c7",
"https://deno.land/std@0.176.0/testing/asserts.ts": "984ab0bfb3faeed92ffaa3a6b06536c66811185328c5dd146257c702c41b01ab"
},
"npm": {
"specifiers": {
"jimp@0.22.8": "jimp@0.22.8_@jimp+custom@0.22.8"
},
"packages": {
"@jimp/bmp@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-JEMKgM1AEvvWfn9ZCHn62nK+QCE3Pb/ZhPdL3NF0ZgKNww6pqOmo6KqXzqY18JLB7c0epuTp4GPDPDhOh/ou1g==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8",
"bmp-js": "bmp-js@0.1.0"
}
},
"@jimp/core@0.22.8": {
"integrity": "sha512-vkN28aFikzQieA6bGxN+qe20pseCAemCyUI0YmRkJIArlb6OujtAwWAKyokv2lylV56bq8EQGIz+Y30OXUnRqg==",
"dependencies": {
"@jimp/utils": "@jimp/utils@0.22.8",
"any-base": "any-base@1.1.0",
"buffer": "buffer@5.7.1",
"exif-parser": "exif-parser@0.1.12",
"file-type": "file-type@16.5.4",
"isomorphic-fetch": "isomorphic-fetch@3.0.0",
"mkdirp": "mkdirp@2.1.6",
"pixelmatch": "pixelmatch@4.0.2",
"tinycolor2": "tinycolor2@1.6.0"
}
},
"@jimp/custom@0.22.8": {
"integrity": "sha512-u6lP9x/HNeGHB0Oojv4c2mhuDvn7G0ikzYbK4IKLsH4HzHxt62faMjBzQMcFhKJhR6UiiKE/jiHrhGvBT/fMkw==",
"dependencies": {
"@jimp/core": "@jimp/core@0.22.8"
}
},
"@jimp/gif@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-I0l6koS67IPU40RPxCJTD1NvePEd8vUIHTejx1ly0jrjGnumbqdarAlBUkDrKfPPc+Fnqp84hBbSN1w5hNPT6w==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8",
"gifwrap": "gifwrap@0.9.4",
"omggif": "omggif@1.0.10"
}
},
"@jimp/jpeg@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-hLXrQ7/0QiUhAVAF10dfGCSq3hvyqjKltlpu/87b3wqMDKe9KdvhX1AJHiUUrAbJv1fAcnOmQGTyXGuySa1D6A==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8",
"jpeg-js": "jpeg-js@0.4.4"
}
},
"@jimp/plugin-blit@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-rQ19txVCKIwo74HtgFodFt4//0ATPCJK+f24riqzb+nx+1JaOo1xRvpJqg4moirHwKR2fhwdDxmY7KX20kCeYA==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-blur@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-GWbNK3YW6k2EKiGJdpAFEr0jezPBtiVxj2wG/lCPuWJz7KmzSSN99hQjIy73xQxoBCRdALfJlkhe3leFNRueSQ==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-circle@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-qPCw8XFW8opT89ciFDuvs+eB3EB1mZIJWVajD2qAlprHiE7YGr34TkM7N5MNr3qZ1pJgkYdW6+HbBrJwBaonqw==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-color@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-ogkbg6rpDVH/mMLgAQKg17z3oZE0VN7ZWxNoH12fUHchqKz1I57zpa65fxZe2I8T5Xz97HR3x+7V7oI8qQGdSA==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8",
"tinycolor2": "tinycolor2@1.6.0"
}
},
"@jimp/plugin-contain@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-blit@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-scale@0.22.8__@jimp+custom@0.22.8__@jimp+plugin-resize@0.22.8___@jimp+custom@0.22.8": {
"integrity": "sha512-oiaPLdJt9Dk+XEEhM/OU3lFemM51mA9NgMCAdburSCjDzKacJYBGFSHjTOhXzcxOie/ZDpOYN/UzFGKy8Dgl9A==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/plugin-blit": "@jimp/plugin-blit@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-resize": "@jimp/plugin-resize@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-scale": "@jimp/plugin-scale@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-cover@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-crop@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-scale@0.22.8__@jimp+custom@0.22.8__@jimp+plugin-resize@0.22.8___@jimp+custom@0.22.8": {
"integrity": "sha512-mO68w1m/LhfuHU8LKHY05a4/hhWnY4t+T+8JCw9t+5yfzA4+LofBZZKtFtWgwf/QGe1y3X2rtUU/avAzDUKyyA==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/plugin-crop": "@jimp/plugin-crop@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-resize": "@jimp/plugin-resize@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-scale": "@jimp/plugin-scale@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-crop@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-ns4oH0h0gezYsbuH8RThcMLY5uTLk/vnqOVjWCehMHEzxi0DHMWCmpcb6bC//vJ+XFNhtVGn1ALN7+ROmPrj+A==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-displace@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-Cj8nHYgsdFynOIx3dbbiVwRuZn3xO+RVfwkTRy0JBye+K2AU8SQJS+hSFNMQFTZt5djivh6kh0TzvR/6LkOd1w==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-dither@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-oE0Us/6bEgrgEg56plU3jSBzvB9iGhweKUHmxYMWnQbFCHP4mNCtPAs8+Fmq6c+m98ZgBgRcrJTnC7lphHkGyw==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-fisheye@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-bWvYY/nfMcKclWEaRyAir+YsT6C5St823HUQAsewZowTrJmme+w4U2a6InsryTHUL01BBcV5BLH0aDHuV3StvA==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-flip@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-rotate@0.22.8__@jimp+custom@0.22.8__@jimp+plugin-blit@0.22.8___@jimp+custom@0.22.8__@jimp+plugin-crop@0.22.8___@jimp+custom@0.22.8__@jimp+plugin-resize@0.22.8___@jimp+custom@0.22.8_@jimp+plugin-blit@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-crop@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8": {
"integrity": "sha512-0NFTNzjsdmOQkaIkNjZqO3/yU4SQb9nnWQXsLS1fFo+9QrIL5v8vVkXpk/rhiND6PyTj2mMTNjOa76GuZcC+iQ==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/plugin-rotate": "@jimp/plugin-rotate@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-blit@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-crop@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-gaussian@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-E/f14aLzCS50QAM7K+InI9V61KVy/Zx52vy7Jjfo1h7qKhQHss3PYaydaH0N6qlXRNeXgh+4/32P9JfieLMcdw==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-invert@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-UauP39FF2cwbA5VU+Tz9VlNa9rtULPSHZb0Huwcjqjm9/G/xVN69VJ8+RKiFC4zM1/kYAUp/6IRwPa6qdKJpSw==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-mask@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-bhg5+3i8x1CmYj6cjvPBQZLwZEI3iK3gJWF25ZHF+12d3cqDuJngtr8oRQOQLlAgvKmrj9FXIiEPDczUI9cnWQ==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-normalize@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-Yg5nreAR1JYuSObu3ExlgaLxVeW6VvjVL5qFwiPFxSNlG8JIwL1Ir3K3ChSnnvymyZvJMHb6YKTYNfXKw5Da6g==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-print@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-blit@0.22.8__@jimp+custom@0.22.8": {
"integrity": "sha512-86O5ejCDi543IYl0TykSmNWErzAjEYhiAxNQb2F7rFRT38WJYNVsvJ6QhxhDQHKxSmF5iwmqbk0jYk5Wp2Z1kw==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/plugin-blit": "@jimp/plugin-blit@0.22.8_@jimp+custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8",
"load-bmfont": "load-bmfont@1.4.1"
}
},
"@jimp/plugin-resize@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-kg8ArQRPqv/iU3DWNXCa8kcVIhoq64Ze0aGCAeFLKlAq/59f5pzAci6m6vV4L/uOVdYmUa9/kYwIFY6RWKpfzQ==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-rotate@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-blit@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-crop@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8": {
"integrity": "sha512-9a+VPZWMN/Cks76wf8LjM5RVA3ntP9+NAdsS1SZhhXel7U3Re/dWMouIEbo3QTt6K+igRo4txUCdZiw4ZucvkQ==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/plugin-blit": "@jimp/plugin-blit@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-crop": "@jimp/plugin-crop@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-resize": "@jimp/plugin-resize@0.22.8_@jimp+custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-scale@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8": {
"integrity": "sha512-dQS4pG6DX6endu8zUpvBBOEtGC+ljDDDNw0scSXY71TxyQdNo5Ro0apfsppjmuAr8rNotRkfyxbITKkXQDRUDQ==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/plugin-resize": "@jimp/plugin-resize@0.22.8_@jimp+custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-shadow@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-blur@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8": {
"integrity": "sha512-HyAhr7OblTQh+BoKHQg4qbS9MweNlH77yfpBqUEyDtfyjI5r06+5chf1ZdLRIPEWv/BdCfdI/g81Wv69muCMwA==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/plugin-blur": "@jimp/plugin-blur@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-resize": "@jimp/plugin-resize@0.22.8_@jimp+custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugin-threshold@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-color@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8": {
"integrity": "sha512-ZmkfH0PtjvF1UcKsjw0H7V6r+LC0yKzEfg76Jhs2nIqIgsxsSOVfHwS7z0/1IWnyXxSw36m+NjCAotNHRILGmA==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/plugin-color": "@jimp/plugin-color@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-resize": "@jimp/plugin-resize@0.22.8_@jimp+custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8"
}
},
"@jimp/plugins@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-blit@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-scale@0.22.8__@jimp+custom@0.22.8__@jimp+plugin-resize@0.22.8___@jimp+custom@0.22.8_@jimp+plugin-crop@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-rotate@0.22.8__@jimp+custom@0.22.8__@jimp+plugin-blit@0.22.8___@jimp+custom@0.22.8__@jimp+plugin-crop@0.22.8___@jimp+custom@0.22.8__@jimp+plugin-resize@0.22.8___@jimp+custom@0.22.8_@jimp+plugin-blur@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-color@0.22.8__@jimp+custom@0.22.8": {
"integrity": "sha512-ieI2+kCpmIfjwVlT7B67ULCzxMizfj7LspJh9HnIZCDXQB9GBOZ9KImLYc75Krae0dP/3FR7FglLiSI7fkOHbw==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/plugin-blit": "@jimp/plugin-blit@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-blur": "@jimp/plugin-blur@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-circle": "@jimp/plugin-circle@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-color": "@jimp/plugin-color@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-contain": "@jimp/plugin-contain@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-blit@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-scale@0.22.8__@jimp+custom@0.22.8__@jimp+plugin-resize@0.22.8___@jimp+custom@0.22.8",
"@jimp/plugin-cover": "@jimp/plugin-cover@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-crop@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-scale@0.22.8__@jimp+custom@0.22.8__@jimp+plugin-resize@0.22.8___@jimp+custom@0.22.8",
"@jimp/plugin-crop": "@jimp/plugin-crop@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-displace": "@jimp/plugin-displace@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-dither": "@jimp/plugin-dither@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-fisheye": "@jimp/plugin-fisheye@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-flip": "@jimp/plugin-flip@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-rotate@0.22.8__@jimp+custom@0.22.8__@jimp+plugin-blit@0.22.8___@jimp+custom@0.22.8__@jimp+plugin-crop@0.22.8___@jimp+custom@0.22.8__@jimp+plugin-resize@0.22.8___@jimp+custom@0.22.8_@jimp+plugin-blit@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-crop@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8",
"@jimp/plugin-gaussian": "@jimp/plugin-gaussian@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-invert": "@jimp/plugin-invert@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-mask": "@jimp/plugin-mask@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-normalize": "@jimp/plugin-normalize@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-print": "@jimp/plugin-print@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-blit@0.22.8__@jimp+custom@0.22.8",
"@jimp/plugin-resize": "@jimp/plugin-resize@0.22.8_@jimp+custom@0.22.8",
"@jimp/plugin-rotate": "@jimp/plugin-rotate@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-blit@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-crop@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8",
"@jimp/plugin-scale": "@jimp/plugin-scale@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8",
"@jimp/plugin-shadow": "@jimp/plugin-shadow@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-blur@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8",
"@jimp/plugin-threshold": "@jimp/plugin-threshold@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-color@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8",
"timm": "timm@1.7.1"
}
},
"@jimp/png@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-XOj11kcCr8zKg24QSwlRfH9k4hbV6rkMGUVxMS3puRzzB0FBSQy42NBYEfYf2XlY2QJSAByPl4AYerOtKb805w==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/utils": "@jimp/utils@0.22.8",
"pngjs": "pngjs@6.0.0"
}
},
"@jimp/tiff@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-K0hYUVW5MLgwq3jiHVHa6LvP05J1rXOlRCC+5dMTUnAXVwi45+MKsqA/8lzzwhHYJ65CNhZwy6D3+ZNzM9SIBQ==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"utif2": "utif2@4.1.0"
}
},
"@jimp/types@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-9+xc+mzuYwu0i+6dsnhXiUgfcS+Ktqn5q2jczoKyyBT0cOKgsk+57EIeFLgpTfVGRKRR0y/UIdHByeCzGguF3A==",
"dependencies": {
"@jimp/bmp": "@jimp/bmp@0.22.8_@jimp+custom@0.22.8",
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/gif": "@jimp/gif@0.22.8_@jimp+custom@0.22.8",
"@jimp/jpeg": "@jimp/jpeg@0.22.8_@jimp+custom@0.22.8",
"@jimp/png": "@jimp/png@0.22.8_@jimp+custom@0.22.8",
"@jimp/tiff": "@jimp/tiff@0.22.8_@jimp+custom@0.22.8",
"timm": "timm@1.7.1"
}
},
"@jimp/utils@0.22.8": {
"integrity": "sha512-AaqjfqDeLzSFzrbGRKHMXg/ntiWKvoG9tpVgWzgOx5/gPWj/IyGfztojLTTvY8HqZCr25z8z91u2lAQD2v46Jw==",
"dependencies": {
"regenerator-runtime": "regenerator-runtime@0.13.11"
}
},
"@tokenizer/token@0.3.0": {
"integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==",
"dependencies": {}
},
"@types/node@16.9.1": {
"integrity": "sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==",
"dependencies": {}
},
"any-base@1.1.0": {
"integrity": "sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg==",
"dependencies": {}
},
"base64-js@1.5.1": {
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"dependencies": {}
},
"bmp-js@0.1.0": {
"integrity": "sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw==",
"dependencies": {}
},
"buffer-equal@0.0.1": {
"integrity": "sha512-RgSV6InVQ9ODPdLWJ5UAqBqJBOg370Nz6ZQtRzpt6nUjc8v0St97uJ4PYC6NztqIScrAXafKM3mZPMygSe1ggA==",
"dependencies": {}
},
"buffer@5.7.1": {
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"dependencies": {
"base64-js": "base64-js@1.5.1",
"ieee754": "ieee754@1.2.1"
}
},
"dom-walk@0.1.2": {
"integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==",
"dependencies": {}
},
"exif-parser@0.1.12": {
"integrity": "sha512-c2bQfLNbMzLPmzQuOr8fy0csy84WmwnER81W88DzTp9CYNPJ6yzOj2EZAh9pywYpqHnshVLHQJ8WzldAyfY+Iw==",
"dependencies": {}
},
"file-type@16.5.4": {
"integrity": "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==",
"dependencies": {
"readable-web-to-node-stream": "readable-web-to-node-stream@3.0.2",
"strtok3": "strtok3@6.3.0",
"token-types": "token-types@4.2.1"
}
},
"gifwrap@0.9.4": {
"integrity": "sha512-MDMwbhASQuVeD4JKd1fKgNgCRL3fGqMM4WaqpNhWO0JiMOAjbQdumbs4BbBZEy9/M00EHEjKN3HieVhCUlwjeQ==",
"dependencies": {
"image-q": "image-q@4.0.0",
"omggif": "omggif@1.0.10"
}
},
"global@4.4.0": {
"integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==",
"dependencies": {
"min-document": "min-document@2.19.0",
"process": "process@0.11.10"
}
},
"ieee754@1.2.1": {
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dependencies": {}
},
"image-q@4.0.0": {
"integrity": "sha512-PfJGVgIfKQJuq3s0tTDOKtztksibuUEbJQIYT3by6wctQo+Rdlh7ef4evJ5NCdxY4CfMbvFkocEwbl4BF8RlJw==",
"dependencies": {
"@types/node": "@types/node@16.9.1"
}
},
"inherits@2.0.4": {
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dependencies": {}
},
"is-function@1.0.2": {
"integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==",
"dependencies": {}
},
"isomorphic-fetch@3.0.0": {
"integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==",
"dependencies": {
"node-fetch": "node-fetch@2.6.11",
"whatwg-fetch": "whatwg-fetch@3.6.2"
}
},
"jimp@0.22.8_@jimp+custom@0.22.8": {
"integrity": "sha512-pBbrooJMX7795sDcxx1XpwNZC8B/ITyDV+JK2/1qNbQl/1UWqWeh5Dq7qQpMZl5jLdcFDv5IVTM+OhpafSqSFA==",
"dependencies": {
"@jimp/custom": "@jimp/custom@0.22.8",
"@jimp/plugins": "@jimp/plugins@0.22.8_@jimp+custom@0.22.8_@jimp+plugin-blit@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-resize@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-scale@0.22.8__@jimp+custom@0.22.8__@jimp+plugin-resize@0.22.8___@jimp+custom@0.22.8_@jimp+plugin-crop@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-rotate@0.22.8__@jimp+custom@0.22.8__@jimp+plugin-blit@0.22.8___@jimp+custom@0.22.8__@jimp+plugin-crop@0.22.8___@jimp+custom@0.22.8__@jimp+plugin-resize@0.22.8___@jimp+custom@0.22.8_@jimp+plugin-blur@0.22.8__@jimp+custom@0.22.8_@jimp+plugin-color@0.22.8__@jimp+custom@0.22.8",
"@jimp/types": "@jimp/types@0.22.8_@jimp+custom@0.22.8",
"regenerator-runtime": "regenerator-runtime@0.13.11"
}
},
"jpeg-js@0.4.4": {
"integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==",
"dependencies": {}
},
"load-bmfont@1.4.1": {
"integrity": "sha512-8UyQoYmdRDy81Brz6aLAUhfZLwr5zV0L3taTQ4hju7m6biuwiWiJXjPhBJxbUQJA8PrkvJ/7Enqmwk2sM14soA==",
"dependencies": {
"buffer-equal": "buffer-equal@0.0.1",
"mime": "mime@1.6.0",
"parse-bmfont-ascii": "parse-bmfont-ascii@1.0.6",
"parse-bmfont-binary": "parse-bmfont-binary@1.0.6",
"parse-bmfont-xml": "parse-bmfont-xml@1.1.4",
"phin": "phin@2.9.3",
"xhr": "xhr@2.6.0",
"xtend": "xtend@4.0.2"
}
},
"mime@1.6.0": {
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dependencies": {}
},
"min-document@2.19.0": {
"integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==",
"dependencies": {
"dom-walk": "dom-walk@0.1.2"
}
},
"mkdirp@2.1.6": {
"integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==",
"dependencies": {}
},
"node-fetch@2.6.11": {
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"dependencies": {
"whatwg-url": "whatwg-url@5.0.0"
}
},
"omggif@1.0.10": {
"integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==",
"dependencies": {}
},
"pako@1.0.11": {
"integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
"dependencies": {}
},
"parse-bmfont-ascii@1.0.6": {
"integrity": "sha512-U4RrVsUFCleIOBsIGYOMKjn9PavsGOXxbvYGtMOEfnId0SVNsgehXh1DxUdVPLoxd5mvcEtvmKs2Mmf0Mpa1ZA==",
"dependencies": {}
},
"parse-bmfont-binary@1.0.6": {
"integrity": "sha512-GxmsRea0wdGdYthjuUeWTMWPqm2+FAd4GI8vCvhgJsFnoGhTrLhXDDupwTo7rXVAgaLIGoVHDZS9p/5XbSqeWA==",
"dependencies": {}
},
"parse-bmfont-xml@1.1.4": {
"integrity": "sha512-bjnliEOmGv3y1aMEfREMBJ9tfL3WR0i0CKPj61DnSLaoxWR3nLrsQrEbCId/8rF4NyRF0cCqisSVXyQYWM+mCQ==",
"dependencies": {
"xml-parse-from-string": "xml-parse-from-string@1.0.1",
"xml2js": "xml2js@0.4.23"
}
},
"parse-headers@2.0.5": {
"integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==",
"dependencies": {}
},
"peek-readable@4.1.0": {
"integrity": "sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==",
"dependencies": {}
},
"phin@2.9.3": {
"integrity": "sha512-CzFr90qM24ju5f88quFC/6qohjC144rehe5n6DH900lgXmUe86+xCKc10ev56gRKC4/BkHUoG4uSiQgBiIXwDA==",
"dependencies": {}
},
"pixelmatch@4.0.2": {
"integrity": "sha512-J8B6xqiO37sU/gkcMglv6h5Jbd9xNER7aHzpfRdNmV4IbQBzBpe4l9XmbG+xPF/znacgu2jfEw+wHffaq/YkXA==",
"dependencies": {
"pngjs": "pngjs@3.4.0"
}
},
"pngjs@3.4.0": {
"integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==",
"dependencies": {}
},
"pngjs@6.0.0": {
"integrity": "sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg==",
"dependencies": {}
},
"process@0.11.10": {
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
"dependencies": {}
},
"readable-stream@3.6.2": {
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dependencies": {
"inherits": "inherits@2.0.4",
"string_decoder": "string_decoder@1.3.0",
"util-deprecate": "util-deprecate@1.0.2"
}
},
"readable-web-to-node-stream@3.0.2": {
"integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==",
"dependencies": {
"readable-stream": "readable-stream@3.6.2"
}
},
"regenerator-runtime@0.13.11": {
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
"dependencies": {}
},
"safe-buffer@5.2.1": {
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"dependencies": {}
},
"sax@1.2.4": {
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dependencies": {}
},
"string_decoder@1.3.0": {
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"dependencies": {
"safe-buffer": "safe-buffer@5.2.1"
}
},
"strtok3@6.3.0": {
"integrity": "sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==",
"dependencies": {
"@tokenizer/token": "@tokenizer/token@0.3.0",
"peek-readable": "peek-readable@4.1.0"
}
},
"timm@1.7.1": {
"integrity": "sha512-IjZc9KIotudix8bMaBW6QvMuq64BrJWFs1+4V0lXwWGQZwH+LnX87doAYhem4caOEusRP9/g6jVDQmZ8XOk1nw==",
"dependencies": {}
},
"tinycolor2@1.6.0": {
"integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==",
"dependencies": {}
},
"token-types@4.2.1": {
"integrity": "sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ==",
"dependencies": {
"@tokenizer/token": "@tokenizer/token@0.3.0",
"ieee754": "ieee754@1.2.1"
}
},
"tr46@0.0.3": {
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"dependencies": {}
},
"utif2@4.1.0": {
"integrity": "sha512-+oknB9FHrJ7oW7A2WZYajOcv4FcDR4CfoGB0dPNfxbi4GO05RRnFmt5oa23+9w32EanrYcSJWspUiJkLMs+37w==",
"dependencies": {
"pako": "pako@1.0.11"
}
},
"util-deprecate@1.0.2": {
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"dependencies": {}
},
"webidl-conversions@3.0.1": {
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
"dependencies": {}
},
"whatwg-fetch@3.6.2": {
"integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==",
"dependencies": {}
},
"whatwg-url@5.0.0": {
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dependencies": {
"tr46": "tr46@0.0.3",
"webidl-conversions": "webidl-conversions@3.0.1"
}
},
"xhr@2.6.0": {
"integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==",
"dependencies": {
"global": "global@4.4.0",
"is-function": "is-function@1.0.2",
"parse-headers": "parse-headers@2.0.5",
"xtend": "xtend@4.0.2"
}
},
"xml-parse-from-string@1.0.1": {
"integrity": "sha512-ErcKwJTF54uRzzNMXq2X5sMIy88zJvfN2DmdoQvy7PAFJ+tPRU6ydWuOKNMyfmOjdyBQTFREi60s0Y0SyI0G0g==",
"dependencies": {}
},
"xml2js@0.4.23": {
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"dependencies": {
"sax": "sax@1.2.4",
"xmlbuilder": "xmlbuilder@11.0.1"
}
},
"xmlbuilder@11.0.1": {
"integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
"dependencies": {}
},
"xtend@4.0.2": {
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"dependencies": {}
}
}
"https://deno.land/std@0.106.0/encoding/base64.ts": "eecae390f1f1d1cae6f6c6d732ede5276bf4b9cd29b1d281678c054dc5cc009e",
"https://deno.land/x/canvas@v1.4.1/deps.ts": "e956026d98094946166e06d7b799290b732db015813870d84e04e33ab88e98f3",
"https://deno.land/x/canvas@v1.4.1/mod.ts": "a4e16972647ceafef58612a377a218372454c99d2c9da615a132694597114f80",
"https://deno.land/x/canvas@v1.4.1/src/base64.ts": "0928031fdba0c43b617154fbe2eb7578366460c04da1422933ae5e936d3d0349",
"https://deno.land/x/canvas@v1.4.1/src/canvas.ts": "58119999b04f68ebeed2627485c5c24c5b0c029707edde0b6568814f9049a3a8",
"https://deno.land/x/canvas@v1.4.1/src/canvaskit.ts": "c3d807472cbb3e1d9fc01bb43ff974ef796c4b010178d1595be5fa793cce5e7d",
"https://deno.land/x/canvas@v1.4.1/src/color_util.ts": "28f1072f0a5acbe7add7fac2f452311a47b44c080806fc4057de2d2e405c6c1c",
"https://deno.land/x/canvas@v1.4.1/src/lib.js": "bb21711589bfbc8997b455cdf53e3150e23289f3b44809188041b1d2fc7924fa",
"https://deno.land/x/canvas@v1.4.1/src/types.ts": "67d5800f8f4b0a407e0251676a03ae91b5f50a3ed53e6b72dc5984113cb93128",
"https://deno.land/x/canvas@v1.4.1/src/wasm.js": "449d72cc14fc4142a5853f944df49a744d852981d09c5515528ede8aebb0afda"
}
}

35
generate-image.ts Normal file
View file

@ -0,0 +1,35 @@
import { createCanvas } from "https://deno.land/x/canvas/mod.ts"
const WeatherInfo = [
' \\ / Sunny',
' .-. 17 °C',
'― ( ) ― ↘ 20 km/h',
' `- 10 km',
' / \\ 0.0 mm',
]
async function genImage(width: number, height: number) {
const canvas = createCanvas(width, height)
const ctx = canvas.getContext('2d')
const fontSize = 16
const lineHeight = fontSize * 1.35
ctx.fillStyle = 'white'
ctx.fillRect(0, 0, width, height)
ctx.fillStyle = 'black'
ctx.font = `${fontSize}px mono`
WeatherInfo.forEach((line, i) => {
ctx.fillText(line, 5, fontSize + lineHeight * i)
})
return Deno.writeFile('generated-image.png', canvas.toBuffer())
}
if (import.meta.main) {
await genImage(800, 480)
}
export default genImage

BIN
generated-image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
monofur.ttf Normal file

Binary file not shown.