Fixing the "ScreenShot" method.

master
Pedro de Oliveira Guedes 2021-12-06 14:51:06 -03:00
parent 59e4b137c5
commit d84ad7763c
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 return ret, err
} }
func (c *Cli) ScreenShot(fmt string) (ret interface{}, err error) { func (c *Cli) ScreenShot(frmt string) (ret []byte, err error) {
err = c.HttpCli().JsonGet("/ipc/wingui/screen/shot?fmt="+fmt, &ret) 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 return ret, err
} }