v0.17.0
Breaking Changes
1. Change additional output type from keyword list to map.
Few operations such as min
returns operation related metadata as last value of the returned tuple.
Previously, this value was a keyword list, now it is changed to a map to make it easy to access a single value from the metadata more intuitively when metadata contains multiple values.
If your code relies on value being a list then your code will break. You have to change to use map instead.
# previously
{:ok, out, [distance: distance]} = Vix.Vips.Operation.fill_nearest(image)
# should be changed to
{:ok, out, %{distance: distance}} = Vix.Vips.Operation.fill_nearest(image)
If you are accessing values using access
protocol, like opt[:field]
then no change is needed.
{:ok, min, opt} = Vix.Vips.Operation.min(image)
# no change needed
x = opt[:y]
2. Skip returning additional output values (flags) when it is empty
Previously in certain cases few operations used to return empty metadata as last value of tuple for example Operation.profile!
used to return {Image.t(), Image.t(), []}
, even when we know that the operation does not have any additional output values. With this release we don't, Operation.profile!
now returns {Image.t(), Image.t()}
. Please change your code accordingly and test.
Non-Breaking Changes
- Add math operators
- Inline operation documentation
- Correct typespec for function to fetch image header fields
- Add dialyzer and update CI to use cache
Full Changelog: v0.16.4...v0.17.0