from pathlib import Path
from PIL import Image, ImageChops
root=Path('/tmp/ev-13351-captures')
for flow in ['G1-G2','C1','C2']:
    for stage in ['input','confirm','outcome']:
        before=Image.open(root/f'before-{flow}-{stage}.png').convert('RGB')
        after=Image.open(root/f'after-{flow}-{stage}.png').convert('RGB')
        ImageChops.difference(before,after).point(lambda x:min(255,x*32)).save(root/f'diff-{flow}-{stage}-t0-amplified32.png')
