line buffer without dealing with edge of image