luogu-painter - paint images on Luogu paint board.
Make sure you have Deno installed, and then run the following in a terminal:
deno install --allow-read --allow-net https://cdn.jsdelivr.net/gh/sjx233/luogu-painter@main/main.tsluogu-painter [OPTION]... FILE X Yluogu-painter tries to draw FILE on Luogu paint board at position (X, Y) if provided tokens. FILE should be a 32-bit RGBA PNG image.
-
-s FILE,--tokens=FILERead tokens from FILE, one per line. Empty lines and lines starting with
#are ignored. -
-r,--randomizePick pixels to draw next randomly instead of sequentially.
-
-t NUMBER,--cooldown=NUMBERFor each token, pause for NUMBER milliseconds after drawing a pixel.
-
-p FILE,--preview=FILEPeriodically save a preview of how the image would be drawn to FILE.
-
-h,--helpDisplay a summary of options and exit.
Assuming tokens.txt includes the following contents:
# these are the tokens
585e035f4d4487a9f20833691a3afe7df593134d
c41413a2796265824bc43c48f38517efe173e61f
To draw an image at position (800, 400) using the 2 tokens, with the order of pixels randomized, while also generating a preview:
luogu-painter -s tokens.txt -r -p preview.png image.png 800 400- GitHub repository: https://github.com/sjx233/luogu-painter.