Skip to content

Negative RGB mapping indices are accepted #19

Description

@sylvesterkaczmarek

prepare_for_display() validates only the upper bound of rgb_mapping indices. Negative indices therefore pass validation and use NumPy negative indexing, silently selecting channels from the end of the image.

For a 4-channel image, rgb_mapping=[-1, 0, 1] is accepted and maps channel 3 into red instead of rejecting the invalid mapping.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions