Boundary stitching algorithm for parallel implementation of error diffusion