mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-30 22:13:54 +00:00
Add image and byte to CBitmap support
This commit is contained in:
parent
a9d995fdf6
commit
8aa3348a2a
11
robotgo.go
11
robotgo.go
@ -394,6 +394,17 @@ func ToRGBA(bit CBitmap) *image.RGBA {
|
||||
return ToRGBAGo(bmp1)
|
||||
}
|
||||
|
||||
// ImgToCBitmap trans image.Image to CBitmap
|
||||
func ImgToCBitmap(img image.Image) CBitmap {
|
||||
return ToCBitmap(ImgToBitmap(img))
|
||||
}
|
||||
|
||||
// ByteToCBitmap trans []byte to CBitmap
|
||||
func ByteToCBitmap(by []byte) CBitmap {
|
||||
img, _ := ByteToImg(by)
|
||||
return ImgToCBitmap(img)
|
||||
}
|
||||
|
||||
// SetXDisplayName set XDisplay name (Linux)
|
||||
func SetXDisplayName(name string) error {
|
||||
cname := C.CString(name)
|
||||
|
Loading…
Reference in New Issue
Block a user