Small image showing fix
This commit is contained in:
@@ -246,10 +246,10 @@ class AnnotationCanvasWidget(QWidget):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Get RGB image data
|
# Get image data in a format compatible with Qt
|
||||||
if self.current_image.channels == 3:
|
if self.current_image.channels in (3, 4):
|
||||||
image_data = self.current_image.get_rgb()
|
image_data = self.current_image.get_rgb()
|
||||||
height, width, channels = image_data.shape
|
height, width = image_data.shape[:2]
|
||||||
else:
|
else:
|
||||||
image_data = self.current_image.get_grayscale()
|
image_data = self.current_image.get_grayscale()
|
||||||
height, width = image_data.shape
|
height, width = image_data.shape
|
||||||
|
|||||||
Reference in New Issue
Block a user