v0.50.0
Enhancements (Image 0.50.0)
- Adds
Image.reduce_colors/2
to reduce the number of colors in an image.Scholar.Cluster.KMeans.fit/2
is used to cluster the colors. The clusters are then used to recolor the image.
Image 0.49.0
This is the changelog for Image version 0.49.0 released on June 28th, 2024. For older changelogs please consult the release tag on GitHub
Enhancements (Image 0.49.0)
-
Updates
Image.dominant_color/2
to take an optional:top_n
which indicates how many of the most dominant colors to return. The default is1
. In addition, the implementation ofImage.dominant_color/2
has been simplified following the advice at libvips/libvips#4016 -
Adds
Image.delta_e/3
to calculate a difference between two colors using one of the CIE color difference algorithms. -
Adds
Image.k_means/2
to cluster image colors into a color palette. This function is only available if scholar is configured. As for any Nx installation, performance is affected by configuration options. It is likely that setting the following inconfig.exs
will be a good idea:
config :nx,
default_backend: EXLA.Backend
config :nx, :default_defn_options,
compiler: EXLA
-
Adds
Image.Color.sort/2
to sort colors perceptually. -
Adds
Image.Color.convert/3
to convert a color from one color space to another. Currently only supportssrgb_to_hsv
.