Packages

Extract dominant colors from given image (using kmeans), wrapper on top of rust kmeans_colors.

Current section

Files

Jump to
dominant_colors lib dominant_colors.ex
Raw

lib/dominant_colors.ex

defmodule DominantColors do
use Rustler,
otp_app: :dominant_colors,
crate: :dominantcolors
# When loading a NIF module, dummy clauses for all NIF function are required.
# NIF dummies usually just error out when called when the NIF is not loaded, as that should never normally happen.
def dominant_colors(_file_name), do: :erlang.nif_error(:nif_not_loaded)
end