Skip to content

Commit

Permalink
comments for reverse_prediction!
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstphrbrns committed Jan 7, 2024
1 parent 5375a4c commit bc0a4d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ifds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ function Base.write(tf::TiffFile{O}, ifd::IFD{O}) where {O <: Unsigned}
return ifd_end_pos
end

# reverse any pre-processing that might have been applied to sample
# values prior to compression
# https://www.awaresystems.be/imaging/tiff/tifftags/predictor.html
function reverse_prediction!(ifd::IFD, arr::AbstractArray{T,N}) where {T, N}
pred::Int = predictor(ifd)
# for planar data, each "pixel" in the strip is actually a single channel
Expand Down

0 comments on commit bc0a4d2

Please sign in to comment.