golang-design / clipboard

📋 cross-platform clipboard package that supports accessing text and image in Go (macOS/Linux/Windows/Android/iOS)
https://golang.design/x/clipboard
MIT License
578 stars 64 forks source link

Image read may block on Windows 10 #14

Closed seth-shi closed 2 years ago

seth-shi commented 2 years ago

when copy text can get text content; but copy image, Read blocking

package main

import (
    "fmt"
    "golang.design/x/clipboard"
)

func main()  {

    fmt.Println(clipboard.Read(clipboard.FmtImage))
}
changkun commented 2 years ago

changkun commented 2 years ago

Can you elaborate more about the issue? or is it not a problem anymore?

seth-shi commented 2 years ago

In Windows 10 when I run the program, the program will always block in the Read method

changkun commented 2 years ago

Which version are you using?

seth-shi commented 2 years ago

wait i come back home, now my pc can run success.

changkun commented 2 years ago

So the problem is not reproducible?

seth-shi commented 2 years ago

module lol

go 1.16

require ( github.com/kbinani/screenshot v0.0.0-20210720154843-7d3a670d8329 // indirect golang.design/x/clipboard v0.5.3 )

seth-shi commented 2 years ago

win 10 block

seth-shi commented 2 years ago

image

no content return empty slice is ok. but has picture content block

changkun commented 2 years ago

Not reproducible for me. I can fetch the picture. Are you using external screenshot software? This package only supports system screen capture, which is triggered by Shift+Win+s.

seth-shi commented 2 years ago

i try keyboard => PrtSc key QQ software screen

changkun commented 2 years ago

Sounds like a problem with QQ which cannot be fixed from our side. Close.

seth-shi commented 2 years ago

I can give you what help you

seth-shi commented 2 years ago

is not qq problem, is ok on other pc

seth-shi commented 2 years ago

wait me upload video

seth-shi commented 2 years ago

https://user-images.githubusercontent.com/28035971/137155817-bf0710c2-d471-4d0c-89d7-63320a9e3493.mp4

changkun commented 2 years ago

Thanks for the video, can you also provide your system and your Go version?

seth-shi commented 2 years ago
# go version
go version go1.16.6 windows/386

# systeminfo
主机名:           DESKTOP-612H964
OS 名称:          Microsoft Windows 10 专业版
OS 版本:          10.0.19043 暂缺 Build 19043
OS 制造商:        Microsoft Corporation
OS 配置:          独立工作站
OS 构建类型:      Multiprocessor Free
changkun commented 2 years ago

PR welcome.

seth-shi commented 2 years ago

old

go version

go version go1.16.6 windows/386

go version

C:\Users\seth-shi\Desktop\go1.16.6.windows-amd64\go\bin\go.exe version

is my problem, i install windows/386(golang) on win10 64 bit. change to windows/amd64(golang) is ok. Whether can add a system digits and golang detection do not match hits

changkun commented 2 years ago

Looks like a user error. Nothing needs to fix here.