Skip to content

Commit

Permalink
Return Image when imfiltering Image (fix #133)
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Jul 26, 2014
1 parent 5238358 commit ecabf7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/algorithms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,8 @@ function imfilter_inseparable{T,K,N}(img::AbstractArray{T,N}, kern::AbstractArra
prepad = [div(size(kern,i)-1, 2) for i = 1:N]
postpad = [div(size(kern,i), 2) for i = 1:N]
A = padarray(img, prepad, postpad, border, convert(T, value))
_imfilter!(Array(typeof(one(T)*one(K)), size(img)), A, data(kern))
result = _imfilter!(Array(typeof(one(T)*one(K)), size(img)), A, data(kern))
copy(img, result)
end

# Special case for 2d kernels: check for separability
Expand Down

0 comments on commit ecabf7a

Please sign in to comment.