ScreenShot method -> Fixed

master
Leonardo Domingues 2021-12-06 15:37:55 -03:00
parent b8e5810103
commit f54514a87a
1 changed files with 7 additions and 2 deletions

View File

@ -413,8 +413,13 @@ func (c *Cli) ScreenSize() (ret []int, err error) {
return ret, err
}
func (c *Cli) ScreenShot(fmt string) (ret interface{}, err error) {
err = c.HttpCli().JsonGet("/ipc/wingui/screen/shot?fmt="+fmt, &ret)
func (c *Cli) ScreenShot(frmt string) (ret []byte, err error) {
url := fmt.Sprintf("/ipc/wingui/screen/shot?fmt=%s", frmt)
ret, err = c.HttpCli().RawGet(url)
if err != nil {
fmt.Print(err.Error())
}
return ret, err
}