What will happen to one pixel if an AI-written script brightens a rectangle? In Part 2 of Photoshot Retouch, I make that prediction before running the script, then check what the PNG actually saved.
Build one small correction
This vibe coding exercise runs in an empty folder with Python. It generates a 448 × 288 RGB image, marks a rectangle by hand, and saves three files. Open the original, the black-and-white mask, and the result side by side.
Input → processing → output
Synthetic RGB and rectangle coordinates → a mask and a weighted brightness change → input.png, mask.png, and output.png.
What came from GitHub?
Part 1 introduced a checklist drawn from Retouch4me’s public examples. This installment uses three entries to follow the local experiment.
- 120 · First code path. OpenCV draws the rectangle on a single-channel mask. Pillow opens and saves the three PNGs. Photoshot’s exercise decides the rectangle and what change to apply. OpenCV · Pillow
- 116 · Blending. NumPy helps calculate a candidate color and mix it with the source using the mask and strength. The same weighted update shows up in Photoshot’s full engine. NumPy
- 121 · Verification. The exercise reopens the PNGs and checks their dimensions, color values, and repeatability. A zero-strength run preserves the original, and zero pixels change outside the rectangle.
At (160, 112), the original RGB is [133, 118, 102]. With a full lift of 40, half strength adds 20 to each channel, giving [153, 138, 122]. Moving the rectangle 20 pixels right leaves that pixel outside the mask, so its original value returns. I checked both predictions against the saved PNGs.
The SLOHERO original has the setup commands, code excerpts, three checklist diagrams, and the downloadable exercise. Part 3 will derive the mask from face and skin analysis.

Top comments (0)