Skip to content

An Exception is Thrown when reading a pixel at a negative position. #1

@ImmutableOctet

Description

@ImmutableOctet

The offending line is here.

Basically, I have two screens, one in the center, and one on my left. When I attempt to pick a pixel on my left screen, the program throws an exception indicating that it cannot take a negative input.

The coordinates provided for the mouse's position are incorrect and provide negative positions. This is a pretty minor problem in practice, because the 'BitmapSource' object indicates that my full desktop is captured.

With that said, a related issue that you (Or I) should fix is in 'ColorConverter.GetColor'. You are currently allocating one byte per-pixel on the active row of the screen, then using the first four elements. What you're looking for is the number of channels, not the height of the screen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions