Question

Is it possible to fetch the histogram of an image with mini_magick or image_science?

I am afraid mini_magicks usage of mogrify does not allow such information retrieval. image_science is hardly documented and seems to be limited to thumbnail scaling and cropping only.

One route to take, would be to iterate over each pixel and extract its values, in Ruby. But that requires information on pixels, which I cannot get to in mini_magick either.

I can fallback to either RMagick or im_magick, but those are either less popular/unknown or reportedly bad in performance.

For the record: this is a part of an earlier question about finding the entropy of parts of images.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top