anthonynsimon / bild

Image processing algorithms in pure Go
MIT License
3.99k stars 213 forks source link

Trim to edges #39

Closed DAddYE closed 7 years ago

DAddYE commented 7 years ago

Hi!

Thanks for this amazing library!

I saw that effect pkg support both Sobel and EdgeDetection.

It is possible to use one of them to trim to the edges?

Basically I have an image, I want to find the edges and trim the images close to its borders.

Thanks so much!

anthonynsimon commented 7 years ago

Hi, it is certainly possible to achieve that, but none of the current operations do that out of the box. The missing part is the function to calculate the area to be trimmed based on the edges detected.