pop-os/cosmic-screenshot

Does not accurately capture selection on scaled outputs.

XV-02 opened this issue · 4 comments

While attempting to take screenshots for a scaling related issue for another Cosmic DE component, I noticed that cosmic-screenshot would not correctly capture the selected areas. I will need to look at how display- and window- capture modes behave as well.

I was attempting to capture the right half (excluding the dock) of my desktop at three scales: 75%, 100%, and 125%.

In the 100% scaled screenshot, the area selected is correctly captured:

screenshot-2024-02-24-00-35-40

In the 75% screenshot, the image does not capture the clock, and is over-provisioned (screenshot captures the excess as transparent. I have filled it as light grey to prevent the image being truncated in-line). Effectively both the left and right edges have been shifted rightwards by what I suspect is a linear multiple of the relative positions of the scaled pixels compared with the screen's actual pixel space.
screenshot-2024-02-24-00-35-04_mod

In the 125% screenshot, the image does not capture the screenedge desired, and the capture spills over to the left of the selected area, indicating that the frame has at least shifted leftwards. The height captured is also shorter than was selected in the screenshot tool. However, the top edge of the image is at the top of the display, which the selection should be.
screenshot-2024-02-24-00-36-04

On all three screeshots, the area was selected by dragging the selection box from top-left to bottom-right. I have yet to test whether the direction of selection will have an impact.

I would note that this seems to be the same issue as reported in #5

Individual window selection and full screen selection on scaled displays seems to be working as desired, I would note. It looks only to be an issue for arbitrary drag-box selection. It doesn't seem that the directionality of dragging the selection makes a difference.

I have the same issue on 200% scaling, and yes, it is exclusive to selecting a section to screenshot.

It appears that, as of at least a8130eb this has been resolved.