diff --git a/assets/_crowdpass.py b/assets/_crowdpass.py index ccd4184..e37f61e 100644 --- a/assets/_crowdpass.py +++ b/assets/_crowdpass.py @@ -4,7 +4,8 @@ # uv run --with pillow --with numpy --with scipy python assets/_crowdpass.py # install # uv run --with pillow --with numpy --with scipy python assets/_crowdpass.py --review # to _refcheck # -# INPUT assets/_refcheck/crowd_seat.png + crowd_clap.png (see `_crowdroll.py`) +# INPUT assets/_sheet_crowd3.png + _sheet_crowd3b.png — the two rolls (see `_crowdroll.py`), +# tracked, because _refcheck is scratch and these are the only copy of the art # OUTPUT assets/x_crowd{,2}.png · x_crowd_c{,2}.png · x_crowd_h{,2}.png · src/crowd.js # # THE PROBLEM THIS SOLVES. Ask a generator for "the same picture with some arms raised" and about a @@ -158,8 +159,8 @@ def write_table(boxes, h, w): def main(review): - A = np.asarray(Image.open(os.path.join(REFCHECK, 'crowd_seat.png')).convert('RGB')) - B = np.asarray(Image.open(os.path.join(REFCHECK, 'crowd_clap.png')).convert('RGB')) + A = np.asarray(Image.open(os.path.join(HERE, '_sheet_crowd3.png')).convert('RGB')) + B = np.asarray(Image.open(os.path.join(HERE, '_sheet_crowd3b.png')).convert('RGB')) arms, lab = raisers(A, B) h, w = A.shape[:2] diff --git a/assets/_crowdroll.py b/assets/_crowdroll.py index 42af81f..31e7fb8 100644 --- a/assets/_crowdroll.py +++ b/assets/_crowdroll.py @@ -1,9 +1,12 @@ # _crowdroll.py — roll the crowd sheet itself: the SEATED master, and the arms-up frame of it. # # uv run --with pillow --with requests python assets/_crowdroll.py seat # -> _refcheck/crowd_seat.png -# uv run --with pillow --with requests python assets/_crowdroll.py clap # from the seated master +# uv run --with pillow --with requests python assets/_crowdroll.py clap # from that seated roll # -# Then `_crowdpass.py` turns the two into an honest pair and grades them into the three courts. +# _refcheck is SCRATCH. A roll you decide to keep is copied to `assets/_sheet_crowd3.png` (seated) +# and `_sheet_crowd3b.png` (arms up) — those two are the tracked art, they are what `_crowdpass.py` +# reads, and they are the only copy there is. Then `_crowdpass.py` turns them into an honest pair +# and grades them into the three courts. # # WHY A SECOND SCRIPT. `_regen.py` cuts SPRITES out of a magenta field — every line of its canvas # block is about isolating figures on a key colour. The crowd is the opposite job: one continuous @@ -117,7 +120,9 @@ if __name__ == '__main__': os.makedirs(OUT, exist_ok=True) what = sys.argv[1] if len(sys.argv) > 1 else 'seat' if what == 'seat': - ref = sys.argv[2] if len(sys.argv) > 2 else os.path.join(OUT, 'crowd_layout.png') + # the layout reference defaults to the seated master in the repo, so a re-roll keeps the + # stand's geometry rather than inventing a new one every time + ref = sys.argv[2] if len(sys.argv) > 2 else os.path.join(HERE, '_sheet_crowd3.png') roll(SEAT, ref, os.path.join(OUT, 'crowd_seat.png')) elif what == 'clap': roll(CLAP, os.path.join(OUT, 'crowd_seat.png'), os.path.join(OUT, 'crowd_clap.png')) diff --git a/assets/_sheet_crowd3.png b/assets/_sheet_crowd3.png new file mode 100644 index 0000000..70e2abf Binary files /dev/null and b/assets/_sheet_crowd3.png differ diff --git a/assets/_sheet_crowd3b.png b/assets/_sheet_crowd3b.png new file mode 100644 index 0000000..5e363f9 Binary files /dev/null and b/assets/_sheet_crowd3b.png differ