Bilinear downsampling, aligning pixel grids and the infamous half pixel offset | Hacker News Reader