Commit f0fec8b
committed
Fix resample code to round half down
The code previously performed the flipping in output space, but the
flipping needs to be in input space because that is where the rounding
to nearest input pixel takes place. Also, flipping in the vertical
direction already happens if origin='lower', so flip vertically only if
origin='upper'.1 parent 814662a commit f0fec8b
1 file changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
213 | 215 | | |
214 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
215 | 221 | | |
216 | 222 | | |
217 | 223 | | |
| |||
220 | 226 | | |
221 | 227 | | |
222 | 228 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
| |||
0 commit comments