Snipaste / feedback

Feedback & wiki for Snipaste https://snipaste.com
3.07k stars 198 forks source link

Copy/paste pinned image doesn't keep rounded corners #3066

Open H3ll3r666 opened 1 month ago

H3ll3r666 commented 1 month ago

Contact Details

No response

What happened?

When copy/pasting rounded screenshots from a pinned image, it fills out the corners with solid black; but works properly if copied directly without the editor.

A bit hard to explain, but here are 2 screenshots.

1) Hit Print-Screen, and immediately hit Copy to Clipboard: when pasted in a document, corners look good. image

2) Hit Print-Screen, Pin to screen (middle-click orr CTRL-T); then from there, copy and paste image: rounded corners are filled with black. image

Platform

Windows Desktop

Version

v2.10 (2024-09-10) Pro 64-bit

liulex commented 1 month ago

Could you record a video for the issue? I could not reproduce the behaviour from your description. rounded_corners

H3ll3r666 commented 1 month ago

It’s on my work PC but I’ll record a video on Monday!

Alex

On Sep 13, 2024 at 9:34:28 PM, Le Liu @.***> wrote:

Could you record a video for the issue? I could not reproduce the behaviour from your description. rounded_corners.gif (view on web) https://github.com/user-attachments/assets/a56d643c-387c-4122-a706-c7c4cfddbaa4

— Reply to this email directly, view it on GitHub https://github.com/Snipaste/feedback/issues/3066#issuecomment-2350768515, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATQUXNHEJGEG2FNQ7DIUXM3ZWOHCJAVCNFSM6AAAAABOFQ3GQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJQG43DQNJRGU . You are receiving this because you authored the thread.Message ID: @.***>

H3ll3r666 commented 1 month ago

Here's a short clip demonstrating the issue with the 2nd image being pasted into an Outlook email, with its rounded corners filled.

https://github.com/user-attachments/assets/043a9dc1-bc86-4d2e-a3b1-ebc93b3d616d

Thinking it might have been an Outlook-only issue, I also just tried to paste it in a gmail email, and saw the same issue.

image

liulex commented 1 month ago

The difference you experienced is due to how images are copied. During snipping, the screenshot is copied as a Windows Bitmap format, which lacks an alpha channel. As a result, the rounded corners are drawn over a white background.

In contrast, when copying an image from the pinned image window, it retains its alpha channel. This means the rounded corners are drawn over a transparent background.

It's worth noting that some applications may not support reading alpha channels from clipboard images. In these cases, the alpha channel is typically replaced with a black background, as seen in your videos.

The intricacies of clipboard image formats can be quite complex. However, to eliminate this difference and ensure consistency, you can simply check the following option: image