diff --git a/.gitignore b/.gitignore index ee2e52a..f83994c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ examples/screen/screen examples/screen/saveCapture.png examples/bitmap/test.png +examples/bitmap/test2.png examples/bitmap/test.tif examples/bitmap/test31.tif test/test.png diff --git a/examples/bitmap/main.go b/examples/bitmap/main.go index 10e1fb5..6656671 100644 --- a/examples/bitmap/main.go +++ b/examples/bitmap/main.go @@ -12,8 +12,10 @@ package main import ( "fmt" + "log" "github.com/go-vgo/robotgo" + "github.com/vcaesar/imgo" // "go-vgo/robotgo" ) @@ -79,6 +81,15 @@ func main() { robotgo.SaveBitmap(bitmap, "test.png") robotgo.SaveBitmap(bitmap, "test31.tif", 1) + img, name, err := robotgo.DecodeImg("test.png") + if err != nil { + log.Println("decode image ", err) + } + fmt.Println("decode test.png", img, name) + + byt := robotgo.OpenImg("test.png") + imgo.Save("test2.png", byt) + // convert image robotgo.Convert("test.png", "test.tif") diff --git a/examples/main.go b/examples/main.go index 6211041..380300a 100644 --- a/examples/main.go +++ b/examples/main.go @@ -12,8 +12,10 @@ package main import ( "fmt" + "log" "github.com/go-vgo/robotgo" + "github.com/vcaesar/imgo" // "go-vgo/robotgo" ) @@ -219,6 +221,15 @@ func bitmap() { robotgo.SaveBitmap(bitmap, "test.png") robotgo.SaveBitmap(bitmap, "test31.tif", 1) + img, name, err := robotgo.DecodeImg("test.png") + if err != nil { + log.Println("decode image ", err) + } + fmt.Println("decode test.png", img, name) + + byt := robotgo.OpenImg("test.png") + imgo.Save("test2.png", byt) + // convert image robotgo.Convert("test.png", "test.tif")