nfnt / resize

Pure golang image resizing
ISC License
3.02k stars 321 forks source link

I'm no longer updating this package. #63

Open nfnt opened 6 years ago

nfnt commented 6 years ago

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.

flibustenet commented 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.

zeusro commented 6 years ago

Thx.

ernsheong commented 5 years ago

Why not open it up to the community?

ealipio commented 5 years ago

@nfnt thanks for your time, it's an awesome tool :smile: it's a pitty see you go

ernsheong commented 5 years ago

A candidate for https://github.com/gofrs see https://github.com/gofrs/help-requests/issues/3

bigtallbill commented 5 years ago

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