package main
import (
"github.com/fishtailstudio/imgo"
)
func main() {
imgo.Load("gopher.png").
Save("out.png")
}
package main
import (
"github.com/fishtailstudio/imgo"
)
func main() {
url := "https://www.baidu.com/img/flexible/logo/pc/result.png"
imgo.Load(url).
Save("out.png")
}
package main
import (
"github.com/fishtailstudio/imgo"
)
func main() {
base64Img := imgo.Load("gopher.png").ToBase64()
imgo.Load(base64Img).Save("out.png")
}
package main
import (
"github.com/fishtailstudio/imgo"
"os"
)
func main() {
file, err := os.Open("gopher.png")
if err != nil {
panic(err)
}
defer file.Close()
imgo.Load(file).
Save("out.png")
}
package main
import (
"github.com/fishtailstudio/imgo"
"image/png"
"os"
)
func main() {
file, err := os.Open("gopher.png")
if err != nil {
panic(err)
}
defer file.Close()
img, err := png.Decode(file)
if err != nil {
panic(err)
}
imgo.Load(img).
Save("out.png")
}
package main
import (
"github.com/fishtailstudio/imgo"
)
func main() {
img := imgo.Load("gopher.png")
imgo.Load(img).
Save("out.png")
}