PSA: This repo is no longer useful as DGG r/Place tech has upgraded to display the pixels on a 3x3 grid on the client side. Artists and devs can supply regular 1x1 pixel art.
- Install Python.
- Install pip.
- Install Pillow.
pip install Pillow
.
3x's the image and moves the original pixel over 1 to the right and 1 down, so its centered.
python upres.py input.png output.png
Does the opposite of upres.
python downres.py input.png output.png
The input needs to be an upressed image.
python position.py input.png output.png X_POS Y_POS
Keep in mind you want 1 extra blank pixel around the art at all sides.
python crop.py input.png output.png X_POS Y_POS WIDTH HEIGHT
You can have as many input images as you want.
python mergemany.py output.png input_1.png input_2.png input_3.png [...]
.
- Crop art out of the dgg-place canvas:
# python crop.py [input] [output] X_POS Y_POS WIDTH HEIGHT
python crop.py dgg-place-template-1.png chad-large.png 3273 882 483 324
python crop.py dgg-place-template-1.png dirlao-large.png 5019 2775 411 225
python crop.py dgg-place-template-1.png dog-large.png 5433 2808 192 192
python crop.py dgg-place-template-1.png pepe-large.png 3168 2799 270 198
python crop.py dgg-place-template-1.png depresstiny-large.png 396 882 315 381
python crop.py dgg-place-template-1.png ua-large.png 1986 957 1287 306
- Downres large art to small:
# python downres.py [input] [output]
python downres.py chad-large.png chad-small.png
python downres.py dirlao-large.png dirlao-small.png
python downres.py dog-large.png dog-small.png
python downres.py pepe-large.png pepe-small.png
python downres.py depresstiny-large.png depresstiny-small.png
python downres.py ua-large.png ua-small.png
-
At this point you can update the small art!
-
Upres small art to large:
# python upres.py [input] [output]
python upres.py chad-small.png chad-large.png
python upres.py dirlao-small.png dirlao-large.png
python upres.py dog-small.png dog-large.png
python upres.py pepe-small.png pepe-large.png
python upres.py depresstiny-small.png depresstiny-large.png
python upres.py ua-small.png ua-large.png
- Place large art in a 6000x3000 canvas:
# python position.py [input] [output] X_POS Y_POS
python position.py chad-large.png chad-canvas.png 3273 882
python position.py dirlao-large.png dirlao-canvas.png 5019 2775
python position.py dog-large.png dog-canvas.png 5433 2808
python position.py pepe-large.png pepe-canvas.png 3168 2799
python position.py depresstiny-large.png depresstiny-canvas.png 396 882
python position.py ua-large.png ua-canvas.png 1986 957
- Merge all canvasses:
# python mergemany.py [output] [input_1] [input_2] [input_3] etc
python mergemany.py dgg-place-template-1-new.png chad-canvas.png dirlao-canvas.png dog-canvas.png pepe-canvas.png depresstiny-canvas.png ua-canvas.png
- Throw
dgg-place-template-1-new.png
on dgg-place after you rename it.
.
I am not a Python dev.
I just managed to cobble this together with some help from GPT-4. I take no responsability.
Seems solid tho, right?