I’ve just published Image version 0.43.0. It has some breaking changes (rename functions in nearly all cases). This brings the code a lot close to a 1.0 release. The remaining issue is to complete the re-write of the color handling code over the next couple of months.
Image version 0.43.0 changelog
Breaking Changes
-
Image.erode/2andImage.dilate/2now take aradiusparameter rather than apixelsparameter. Both functions have been refactored to allow a radius in the range1..5with a default of1. The radius represents the dimension of the matrix used in theVix.Vips.Operations.range/4function that underpins dilation and erosion. As such they represent the approximate number of pixels eroded or dilated. In addition, this function now results in a singlelibvipsoperation. The previous implementation creatednoperations (wherenwas the value of thepixelsparam) that could result in a slow imaging pipeline and in some cases a segfault of the entire VM due to stack space exhaustion in libvips. -
The signature for
Image.linear_gradient/{1..3}has changed. The function now takes:- An image and an optional keyword list of options
- A width and height as numbers and a keyword list of options
-
Image.dominant_color/2now returns an{:ok, rgb_color}tuple rather than a[r, g, b]list. UseImage.dominant_color!/2if only the color value return is required. -
Image.map_pages/2is deprecated in favour ofImage.map_join_pages/2to better reflect the intent of the function.
Enhancements
-
Image.linear_gradient/{1..3}now takes an:angleoption which determines the angle of the gradient in degrees. Thanks to @severian1778 for considerable patience. Closes #67. -
Improve options handling and documentation for
Image.radial_gradient/3. -
Add
Image.radial_gradient!/3to mirrorImage.radial_gradient/3. -
Add
Image.dominant_color!/2to mirrorImage.dominant_color/2. -
Add
Image.extract_pages/1which will extract the pages of a multi-page image into a list of separate images.






















