nfnt / resize

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

Ability to crop with a rectangle argument #24

Closed peterbe closed 9 years ago

peterbe commented 9 years ago

I like this: https://code.google.com/p/appengine-go/source/browse/example/moustachio/resize/resize.go because I can supply a rectangle to crop the image.

nfnt commented 9 years ago

In my opinion that's not necessary. An image.Image provides that rectangle (and other metadata like color space information). By using the SubImage() command of any image type you can crop images without having to rely on a third-party package to do so.

peterbe commented 9 years ago

Wow! I didn't know that. I'll look into this SubImage() thing.