Skip to content

Commit

Permalink
apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Nov 29, 2023
1 parent f398edd commit 0dd31d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function _load(png_ptr, info_ptr; gamma::Union{Nothing,Float64}=nothing, expand_
end

function _load!(buffer::Matrix{T}, png_ptr, info_ptr) where T # separate to support precompilation of permutedims
png_read_image(png_ptr, map(pointer, eachcol(reinterpret(UInt8, buffer))))
png_read_image(png_ptr, map(a -> Ptr{Ptr{UInt8}}(pointer(a)), eachcol(buffer)))
png_read_end(png_ptr, info_ptr)
png_destroy_read_struct(Ref{Ptr{Cvoid}}(png_ptr), Ref{Ptr{Cvoid}}(info_ptr), C_NULL)
return permutedims(buffer, (2, 1))
Expand Down

0 comments on commit 0dd31d6

Please sign in to comment.