-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
In the edit_new_image_parameters method of PluginBase, the shape tuple is unpacked as follows:
if shape is not None:
newparam.width, newparam.height = shape
This code assumes that shape is a tuple of (width, height). However, DataLab uses a different convention for image shapes, where the tuple should be interpreted as (height, width). As a result, the current unpacking will lead to images with swapped dimensions for non-square images. This issue has not been noticed so far because the method is only used once in the code base for a square image.
Expected behavior
The method should unpack the shape tuple according to DataLab's convention, ensuring that images are created with the correct dimensions.
Suggested fix
if shape is not None:
newparam.height , newparam.width = shape
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working