fix(natives): decoded CF_DIB directly when arboard rejects an image

arboard's Windows reader feeds Qt-style CF_DIBV5 payloads (BI_RGB plus
alpha mask, rewritten to BI_BITFIELDS by its header tweak) to a
header-less BMP decode that mis-places the pixel offset for V4/V5
bitfield headers, so PixPin/Snipaste screenshots failed with
ConversionFailure. read_image_from_clipboard now falls back to reading
the raw CF_DIB clipboard bytes and decoding them through the BMP file
path with an explicit bfOffBits, keeping native Windows image paste off
the PowerShell bridge.

Fixes #3426
This commit is contained in:
can1357
2026-07-09 18:31:36 +02:00
parent 5d1e25f834
commit 606c51a7b7
5 changed files with 242 additions and 3 deletions
+1
View File
@@ -269,6 +269,7 @@ napi-derive = "3"
# Terminal & PTY
# ──────────────────────────────────────────────────────────────────────────────
arboard = { version = "3.6.1", features = ["wayland-data-control"] }
clipboard-win = "5.4"
icy_sixel = "0.5"
portable-pty = "0.9"