3 ms·
I have gone through the code before he commented here to see how he did the smart cropping (1. create histogram, 2. calculate entropy) and think he could have m
by allendoerfer 10y ago
I have gone through the code before he commented here to see how he did the smart cropping (1. create histogram, 2. calculate entropy) and think he could have maybe made the histogram and the entropy calculation available as separate libraries or use an existing one, but they are not too big either and I think the use cases would anyway involve some sort of image processing most of the time.
The interface to crop smartly definitely belongs in an image library, especially when it is a wrapper around a native program focused on easy of use and a clean interface.