Closed T1960CT closed 5 years ago
The godocs do show the open, encode, save
functions, but then in the example it also shows imgio.JPEGEncoder(100)
(https://godoc.org/github.com/anthonynsimon/bild/imgio#Save)
The repository maintainers botched the last two version tags. It should be v0.11.1
and not 0.11.1
. For the latest version, you need to require github.com/anthonynsimon/bild v0.10.1-0.20190731110047-60869ee308e5
in your go.mod
until the tag is fixed.
Thanks for taking a look! I’ll fix the tag in the coming days.
After using
go get github.com/anthonynsimon/bild
(go mod file shows it getting v0.10.0) and pasting the readme example, VSCode shows thatimgio.PNGEncoder()
doesn't exist. After looking into the /pkg/mod/github.com/anthonynsimon/bild@v0.10.0/imgio/io.go file, I only have theOpen, Encode, Save
functions. I'm running go 1.13, currently on a Windows 10 host.I had to change the line:
imgio.Save("output.png", rotated, imgio.PNGEncoder())
toimgio.Save("output.png", rotated, imgio.PNG)
Not sure if there's a problem with the copy served to me, or the README file is out of date, but would love some clarification if possible. Thanks!