Small image showing fix

This commit is contained in:
2025-12-11 11:20:20 +02:00
parent 833b222fad
commit 221c80aa8c

View File

@@ -246,10 +246,10 @@ class AnnotationCanvasWidget(QWidget):
return
try:
# Get RGB image data
if self.current_image.channels == 3:
# Get image data in a format compatible with Qt
if self.current_image.channels in (3, 4):
image_data = self.current_image.get_rgb()
height, width, channels = image_data.shape
height, width = image_data.shape[:2]
else:
image_data = self.current_image.get_grayscale()
height, width = image_data.shape