Mogrify.histogram
You're seeing just the function
histogram
, go back to Mogrify module for more information.
Returns the histogram of the image
Runs ImageMagick's histogram:info:-
command.
Results are returned as a list of maps where each map includes keys red, blue, green, hex and count.
Examples
iex> open("test/fixtures/rbgw.png") |> histogram
[
%{"alpha" => 255, "blue" => 255, "count" => 400, "green" => 0, "hex" => "#0000ff", "red" => 0},
%{"alpha" => 255, "blue" => 0, "count" => 225, "green" => 255, "hex" => "#00ff00", "red" => 0},
%{"alpha" => 255, "blue" => 0, "count" => 525, "green" => 0, "hex" => "#ff0000", "red" => 255},
%{"alpha" => 255, "blue" => 255, "count" => 1350, "green" => 255, "hex" => "#ffffff", "red" => 255}
]