Pixel snapping fix for odd resolutions

Fixed an issue with the half pixel offset calculations on odd sized
resolutions.