An easy to use image cropping library built on top of imaging. This package is just a wrapper to imaging.
$ go get github.com/stevenferrer/croptop
- Decode image from a reader.
img, err := croptop.Decode(r)
// handle error
- Specify crop options and encode to a writer.
err = img.Height(height).Width(width).
OffsetX(offsetX).OffsetY(offsetY).
Crop().Encode(w)
// handle error
MIT