v0.50.0
Enhancements (Image 0.50.0)
- Adds
Image.reduce_colors/2to reduce the number of colors in an image.Scholar.Cluster.KMeans.fit/2is 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/2to take an optional:top_nwhich indicates how many of the most dominant colors to return. The default is1. In addition, the implementation ofImage.dominant_color/2has been simplified following the advice at libvips/libvips#4016 -
Adds
Image.delta_e/3to calculate a difference between two colors using one of the CIE color difference algorithms. -
Adds
Image.k_means/2to 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.exswill be a good idea:
config :nx,
default_backend: EXLA.Backend
config :nx, :default_defn_options,
compiler: EXLA-
Adds
Image.Color.sort/2to sort colors perceptually. -
Adds
Image.Color.convert/3to convert a color from one color space to another. Currently only supportssrgb_to_hsv.