Skip to content

Incorrect unpacking of image shape in get_newparam_from_current #247

@cdebonnel

Description

@cdebonnel

Description

When creating a new image, the dimensions of the last image are not remembered correctly—the width and height are swapped.

Expected behavior

The dimensions of the last image should be used as default values.

Suggested fix

In the get_newparam_from_current method of ImagePanel, the shape tuple is unpacked as follows:

if curobj is not None: newparam.width, newparam.height = curobj.data.shape

It should be changed to:

if curobj is not None: newparam.height, newparam.width = curobj.data.shape

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions