Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ coverage.xml
dmypy.json

# IDEA config files
.idea/
.idea/

.vscode/
6 changes: 4 additions & 2 deletions cocoviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ def draw_bboxes(draw, objects, labels, obj_categories, ignore, width, label_size
# TODO: Implement notification message as popup window
font = ImageFont.load_default()

tw, th = draw.textsize(text, font)
# use pillow==9.5.0
tw, th = font.getsize(text)

tx0 = b[0]
ty0 = b[1] - th

Expand Down Expand Up @@ -534,7 +536,7 @@ def __init__(self, data, root, image_panel, statusbar, menu, objects_panel, slid
self.labels_on_global = tk.BooleanVar() # Toggles category labels
self.labels_on_global.set(True)
self.masks_on_global = tk.BooleanVar() # Toggles masks globally
self.masks_on_global.set(True)
self.masks_on_global.set(False)
self.coloring_on_global = tk.BooleanVar() # Toggles objects/categories coloring
self.coloring_on_global.set(False) # False for categories (defaults), True for objects
# Menu Configuration
Expand Down