Skip to content

Commit 4d89e5c

Browse files
authored
ImageTransformations v0.9.0 (#122)
1 parent e1ef518 commit 4d89e5c

File tree

5 files changed

+70
-12
lines changed

5 files changed

+70
-12
lines changed

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# ImageTransformations
2+
3+
## Version `v0.9.0`
4+
5+
This release contains numerous enhancements as well as quite a few deprecations. There are also
6+
internal changes that may cause small numerical differences from previous versions; these may be
7+
most obvious at the borders of the image, where decisions about inbounds/out-of-bounds can determine
8+
whether a "fill-value" is used instead of interpolation.
9+
10+
- ![BREAKING][badge-breaking] Previously, `SubArray` passed to `invwarpedview` will use out-of-domain values to build a better result on the border. This violated the array abstraction and has therefore been removed. ([#138][github-138])
11+
- ![BREAKING][badge-breaking] Rounding for numerical stability in `warp` is now applied to the corner points instead of to the transformation coefficients. ([#143][github-143])
12+
- ![Deprecation][badge-deprecation] `degree` and `fill` arguments are deprecated in favor of their keyword versions `method` and `fillvalue`. ([#116][github-116])
13+
- ![Deprecation][badge-deprecation] `invwarpedview` is deprecated in favor of `InvWarpedView`. ([#116][github-116], [#138][github-138])
14+
- ![Deprecation][badge-deprecation] `warpedview` is deprecated in favor of `WarpedView`. ([#116][github-116])
15+
- ![Enhancement][badge-enhancement] `restrict`/`restrict!` are moved to more lightweight package [ImageBase.jl]. ([#127][github-127])
16+
- ![Enhancement][badge-enhancement] `imresize` now works on transparent colorant types(e.g., `ARGB`). ([#126][github-126])
17+
- ![Enhancement][badge-enhancement] `restrict` now works on 0-argument colorant types(e.g., `ARGB32`). ([ImageBase#3][github-base-3])
18+
- ![Bugfix][badge-bugfix] Interpolations v0.13.3 compatibility (though 0.13.4 is now required). ([#132][github-132])
19+
- ![Bugfix][badge-bugfix] `restrict` on singleton dimension is now a no-op. ([ImageBase#8][github-base-8])
20+
- ![Bugfix][badge-bugfix] `restrict` on `OffsetArray` always returns an `OffsetArray` result. ([ImageBase#4][github-base-4])
21+
22+
[github-143]: https://github.com/JuliaImages/ImageTransformations.jl/pull/143
23+
[github-138]: https://github.com/JuliaImages/ImageTransformations.jl/pull/138
24+
[github-132]: https://github.com/JuliaImages/ImageTransformations.jl/pull/132
25+
[github-127]: https://github.com/JuliaImages/ImageTransformations.jl/pull/127
26+
[github-126]: https://github.com/JuliaImages/ImageTransformations.jl/pull/126
27+
[github-116]: https://github.com/JuliaImages/ImageTransformations.jl/pull/116
28+
[github-base-8]: https://github.com/JuliaImages/ImageBase.jl/pull/8
29+
[github-base-4]: https://github.com/JuliaImages/ImageBase.jl/pull/4
30+
[github-base-3]: https://github.com/JuliaImages/ImageBase.jl/pull/3
31+
32+
33+
[ImageBase.jl]: https://github.com/JuliaImages/ImageBase.jl
34+
35+
36+
[badge-breaking]: https://img.shields.io/badge/BREAKING-red.svg
37+
[badge-deprecation]: https://img.shields.io/badge/deprecation-orange.svg
38+
[badge-feature]: https://img.shields.io/badge/feature-green.svg
39+
[badge-enhancement]: https://img.shields.io/badge/enhancement-blue.svg
40+
[badge-bugfix]: https://img.shields.io/badge/bugfix-purple.svg
41+
[badge-security]: https://img.shields.io/badge/security-black.svg
42+
[badge-experimental]: https://img.shields.io/badge/experimental-lightgrey.svg
43+
[badge-maintenance]: https://img.shields.io/badge/maintenance-gray.svg
44+
45+
<!--
46+
# Badges
47+
48+
![BREAKING][badge-breaking]
49+
![Deprecation][badge-deprecation]
50+
![Feature][badge-feature]
51+
![Enhancement][badge-enhancement]
52+
![Bugfix][badge-bugfix]
53+
![Security][badge-security]
54+
![Experimental][badge-experimental]
55+
![Maintenance][badge-maintenance]
56+
-->

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ImageTransformations"
22
uuid = "02fcd773-0e25-5acc-982a-7f6622650795"
3-
version = "0.8.12"
3+
version = "0.9.0"
44

55
[deps]
66
AxisAlgorithms = "13072b0f-2c55-5437-9ae7-d433b7a33950"

src/ImageTransformations.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ using Interpolations, AxisAlgorithms
88
using OffsetArrays
99
using ColorVectorSpace
1010

11-
import Base: eltype, size, length
1211
using Base: tail, Indices
13-
using Base.Cartesian
14-
using .ColorTypes: AbstractGray, TransparentGray, TransparentRGB
1512

1613
# these two symbols previously live in ImageTransformations
1714
import ImageBase: restrict, restrict!

src/autorange.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ struct CornerIterator{I<:CartesianIndex}
5454
end
5555
CornerIterator(R::CartesianIndices) = CornerIterator(first(R), last(R))
5656

57-
eltype(::Type{CornerIterator{I}}) where {I} = I
57+
Base.eltype(::Type{CornerIterator{I}}) where {I} = I
5858
Base.Iterators.IteratorSize(::Type{CornerIterator{I}}) where {I<:CartesianIndex{N}} where {N} = Base.Iterators.HasShape{N}()
5959

6060
# in 0.6 we could write: 1 .+ (iter.stop.I .- iter.start.I .!= 0)
61-
size(iter::CornerIterator{CartesianIndex{N}}) where {N} = ntuple(d->iter.stop.I[d]-iter.start.I[d]==0 ? 1 : 2, Val(N))::NTuple{N,Int}
62-
length(iter::CornerIterator) = prod(size(iter))
61+
Base.size(iter::CornerIterator{CartesianIndex{N}}) where {N} = ntuple(d->iter.stop.I[d]-iter.start.I[d]==0 ? 1 : 2, Val(N))::NTuple{N,Int}
62+
Base.length(iter::CornerIterator) = prod(size(iter))
6363

6464
@inline function Base.iterate(iter::CornerIterator{<:CartesianIndex})
6565
if any(map(>, iter.start.I, iter.stop.I))

src/compat.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66
@inline isnothing(x) = x === nothing
77
end
88

9-
# FIXME: upstream https://github.com/JuliaGraphics/ColorVectorSpace.jl/issues/75
10-
@inline _nan(::Type{HSV{Float16}}) = HSV{Float16}(NaN16,NaN16,NaN16)
11-
@inline _nan(::Type{HSV{Float32}}) = HSV{Float32}(NaN32,NaN32,NaN32)
12-
@inline _nan(::Type{HSV{Float64}}) = HSV{Float64}(NaN,NaN,NaN)
13-
@inline _nan(::Type{T}) where {T} = nan(T)
9+
if hasmethod(nan, Tuple{Type{HSV{Float32},}})
10+
# requires ColorTypes v0.11 and ColorVectorSpace v0.9.4
11+
# https://github.com/JuliaGraphics/ColorVectorSpace.jl/issues/75
12+
@inline _nan(::Type{T}) where T = nan(T)
13+
else
14+
@inline _nan(::Type{HSV{Float16}}) = HSV{Float16}(NaN16,NaN16,NaN16)
15+
@inline _nan(::Type{HSV{Float32}}) = HSV{Float32}(NaN32,NaN32,NaN32)
16+
@inline _nan(::Type{HSV{Float64}}) = HSV{Float64}(NaN,NaN,NaN)
17+
@inline _nan(::Type{T}) where {T} = nan(T)
18+
end

0 commit comments

Comments
 (0)