Skip to content

v0.50.0

Compare
Choose a tag to compare
@kipcole9 kipcole9 released this 28 Jun 03:55
· 75 commits to main since this release

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 is 1. In addition, the implementation of Image.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 in config.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 supports srgb_to_hsv.