Open nfnt opened 6 years ago
Thanks for everything, it just work for me ! I hope somebody will continue to maintain it... Maybe you could tag it to make it friendly with vgo ? It can also help for an eventual fork.
Thx.
Why not open it up to the community?
@nfnt thanks for your time, it's an awesome tool :smile: it's a pitty see you go
A candidate for https://github.com/gofrs see https://github.com/gofrs/help-requests/issues/3
As i had trouble finding examples using golang.org/x/image/draw to scale an image i cobbled together this basic example:
// Scale will use the provided scaler to resize src to the bounds in rect
// It will always return an RGBA image
func Scale(src image.Image, rect image.Rectangle, scale draw.Scaler) image.Image {
dst := image.NewRGBA(rect)
scale.Scale(dst, rect, src, src.Bounds(), draw.Over, nil)
return dst
}
Usage:
scaled := Scale(src, image.Rect(0, 0, 200, 200), draw.ApproxBiLinear)
full credit goes to this gist https://gist.github.com/logrusorgru/570d64fd6a051e0441014387b89286ca
As it may have been apparent by my long reaction time to PRs and issues, I haven't spend too much time working on this package in the last years. And I plan to keep it that way, hence I won't really look at PRs and issues anymore. Take a look at x/image/draw or gopkg.in/gographics/imagick.v2/imagick for packages that offer image resizing and much more.