from PIL import Image, ImageDraw
import sys
im=Image.open(sys.argv[1])
d=ImageDraw.Draw(im)
# Mask the four raw patch header rows containing private absolute workspace paths.
# File title, counts, missing-file notice, hunk headers and both hello lines are unchanged.
for top,bottom in [(153,252),(273,332),(373,473),(493,533)]:
 d.rectangle((785,top,1279,bottom),fill='#e9f8ef')
 d.text((792,top+6),'[workspace path header redacted]',fill='#53645c')
im.save(sys.argv[2])
