1. An apparatus of decoding an image, the apparatus comprising: an entropy decoder which obtains information about an intra prediction mode applied to a current block to be decoded, from a bitstream; and an intra prediction performer which obtains one of a left neighboring pixel whose location is determined based on j*dy>>n and a up neighboring pixel whose location is determined based on i*dx>>m, where a current pixel is located on (i,j), dx, dy, m and n are integers and performs intra prediction on the current pixel using one of the left neighboring pixel and the up neighboring pixel.