markup: debug images draw in red for visibility

This commit is contained in:
2020-03-16 16:55:10 -07:00
parent 927ad0dcaf
commit 5c222e6a52

View File

@ -123,7 +123,7 @@ def write_inklist(obj, mediabox, path):
draw = ImageDraw.Draw(img, 'RGBA') draw = ImageDraw.Draw(img, 'RGBA')
for segment in obj['InkList']: for segment in obj['InkList']:
draw.line(segment, 'black', 3) draw.line(segment, 'red', 3)
# account for the difference in coordinate systems # account for the difference in coordinate systems
# between pdf and images. # between pdf and images.
@ -142,9 +142,9 @@ def write_square_or_circle(obj, mediabox, path):
draw = ImageDraw.Draw(img, 'RGBA') draw = ImageDraw.Draw(img, 'RGBA')
if obj["Subtype"] == LIT('Square'): if obj["Subtype"] == LIT('Square'):
draw.rectangle(obj['Rect'], fill=None, outline='black', width=3) draw.rectangle(obj['Rect'], fill=None, outline='red', width=3)
else: else:
draw.ellipse(obj['Rect'], fill=None, outline='black', width=3) draw.ellipse(obj['Rect'], fill=None, outline='red', width=3)
# account for the difference in coordinate systems # account for the difference in coordinate systems
# between pdf and images. # between pdf and images.