Skip to content

Commit

Permalink
Merge pull request #38 from JuliaImages/teh/fix32bit
Browse files Browse the repository at this point in the history
Fix errors on 32bit platforms
  • Loading branch information
timholy authored Aug 19, 2017
2 parents 8e1541e + 7b98476 commit 533edd8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/imfilter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ end
@inline function imfilter(::Type{T}, img::AbstractArray, kernel::Union{ArrayLike,Laplacian}, args...) where T
imfilter(T, img, factorkernel(kernel), args...)
end
@inline function imfilter(::Type{T}, img::AbstractArray{TI}, kernel::AbstractArray{TK}, args...) where {T<:Integer,TI<:Integer,TK<:Integer}
imfilter(T, img, (kernel,), args...)
end

# Step 3: if necessary, fill in the default border
function imfilter(::Type{T}, img::AbstractArray, kernel::ProcessedKernel, args...) where T
Expand Down
3 changes: 3 additions & 0 deletions test/specialty.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ using Base.Test
makeimpulse(RGB{Float32}, (5,), 3),
makeimpulse(RGB{N0f8}, (5,), 3))
af = imfilter(a, kern)
if eltype(a) == unsigned(Int)
continue # the concatenation below fails
end
T = eltype(a)
@test af == [zero(T),a[3],-2a[3],a[3],zero(T)]
af = imfilter(a, (kern,))
Expand Down

0 comments on commit 533edd8

Please sign in to comment.