Skip to content

Commit 1b9a753

Browse files
committed
Fix Pad bounds calculation
1 parent be18dbd commit 1b9a753

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/projective/crop.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ function projectionbounds(
8484
sz = length.(ranges)
8585
pad = (cropped.crop.by .- (sz .% cropped.crop.by)) .% cropped.crop.by
8686

87-
indices = UnitRange.(getindex.(ranges, 1), sz .+ pad)
88-
return Bounds(indices)
87+
start = minimum.(ranges)
88+
end_ = start .+ sz .+ pad .- 1
89+
rs = UnitRange.(start, end_)
90+
return Bounds(rs)
8991
end
9092

9193

0 commit comments

Comments
 (0)