### What did you do? I down-sample an image with BOX filter. Here is the image: [table-51.png](https://github.com/user-attachments/assets/fd51bff0-caf2-4c39-b002-7872ccb8de82) (width="2755" height="1837") --- ### What did you expect to happen? All pixels are counted while down-sampling. The result should look like this (688x459, 459x306): <img width="688" height="459" alt="Image" src="https://github.com/user-attachments/assets/4a8c14c4-e7ab-4d31-80e2-0d2f6df4e994" /> [box-js-v3-table-51.png-688x459-49c214b-pil-like.png](https://github.com/user-attachments/assets/4a8c14c4-e7ab-4d31-80e2-0d2f6df4e994) \--- <img width="459" height="306" alt="Image" src="https://github.com/user-attachments/assets/4edbcc87-b42a-44a0-8349-ac2350edba80" /> [box-js-v3-table-51.png-459x306-20d1f1f-pil-like.png](https://github.com/user-attachments/assets/4edbcc87-b42a-44a0-8349-ac2350edba80) --- ### What actually happened? Some edge-case pixels were skipped. \--- Downscaled `4` times to 688x459: <img width="688" height="459" alt="Image" src="https://github.com/user-attachments/assets/38dd97ca-013c-4782-8e82-d3f9b75d14f1" /> [box-pil-table-51.png-688x459-49c7ade.png](https://github.com/user-attachments/assets/38dd97ca-013c-4782-8e82-d3f9b75d14f1) missed a central vertical line. \--- Downscaled `6` times to 459x306: <img width="459" height="306" alt="Image" src="https://github.com/user-attachments/assets/04a98318-4bab-4090-bf72-ed598ec7e0e2" /> [box-pil-table-51.png-459x306-20d5e62.png](https://github.com/user-attachments/assets/04a98318-4bab-4090-bf72-ed598ec7e0e2) missed a central horizontal line. --- ### What are your OS, Python and Pillow versions? * OS: Win 10 * Python: 3.12 * Pillow: 12.3.0 ```python file_path = "./table-51.png" scale = 4 # scale(-down) image = Image.open(file_path) image_gray = image.convert("L") wh = (int(image.width / scale), int(image.height / scale)) image = image_gray.resize(wh, Image.Resampling.BOX) ``` --- _Search words: off-by-one error, range rounding._