gotracker/screenshot/screenshothandler.go

26 lines
644 B
Go
Raw Normal View History

2024-10-25 18:57:53 +02:00
package screenshot
// n := screenshot.NumActiveDisplays()
//
// client := gosseract.NewClient()
// defer client.Close()
//
// for i := 0; i < n; i++ {
// bounds := screenshot.GetDisplayBounds(i)
//
// img, err := screenshot.CaptureRect(bounds)
// if err != nil {
// panic(err)
// }
// fileName := fmt.Sprintf("%d_%dx%d.png", i, bounds.Dx(), bounds.Dy())
// file, _ := os.Create(fileName)
// defer file.Close()
// png.Encode(file, img)
//
// fmt.Printf("#%d : %v \"%s\"\n", i, bounds, fileName)
// client.SetImage(fileName)
// text, _ := client.Text()
// fmt.Println(text)
// }
// Hello, World!