An apparatus for decoding an image, the apparatus comprising: an entropy decoder which extracts an intra prediction mode of a current block from a bitstream, the intra prediction mode indicating a particular direction among a plurality of directions, wherein the particular direction is indicated by using one of a dx number in a horizontal direction and a fixed number in a vertical direction, or a dy number in the vertical direction and a fixed number in the horizontal direction, wherein dx and dy are integers; an intra prediction performer which performs intra prediction on the current block; and a restorer which restores the current block by adding the intra-predicted current block and a residual obtained from the bitstream, wherein the intra prediction performer determines location of neighboring pixels of the neighboring block previously reconstructed before the current block using shift operation based on a position of a current pixel and one of the dx number and the dy number indicating the particular direction, the neighboring pixels being located on a left side of the current block or an upper side of the current block, characterised in that the location of the neighboring pixels located on the upper side of the current block is determined based on i * dx >> 5, where i is a position of the current pixel in the vertical direction, and dx is the dx number in the horizontal direction and >> is the bitwise shift operation, and the location of the neighboring pixels located on the left side of the current block is determined based on j * dy >> 5, where j is a position of the current pixel in the horizontal direction, and dy is the dy number in the vertical direction, wherein i) the fixed number in the horizontal direction has a fixed value of 2^5 and the dy number is determined from among {32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, - 26, -32}, or ii) the fixed number in the vertical direction has a fixed value of 2^5 and the dx number is determined from among {32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, -26, - 32} according to the intra prediction mode of the current block. an entropy decoder which extracts an intra prediction mode of a current block from a bitstream, the intra prediction mode indicating a particular direction among a plurality of directions, wherein the particular direction is indicated by using one of a dx number in a horizontal direction and a fixed number in a vertical direction, or a dy number in the vertical direction and a fixed number in the horizontal direction, wherein dx and dy are integers; an intra prediction performer which performs intra prediction on the current block; and a restorer which restores the current block by adding the intra-predicted current block and a residual obtained from the bitstream, wherein the intra prediction performer determines location of neighboring pixels of the neighboring block previously reconstructed before the current block using shift operation based on a position of a current pixel and one of the dx number and the dy number indicating the particular direction, the neighboring pixels being located on a left side of the current block or an upper side of the current block, characterised in that the location of the neighboring pixels located on the upper side of the current block is determined based on i * dx >> 5, where i is a position of the current pixel in the vertical direction, and dx is the dx number in the horizontal direction and >> is the bitwise shift operation, and the location of the neighboring pixels located on the left side of the current block is determined based on j * dy >> 5, where j is a position of the current pixel in the horizontal direction, and dy is the dy number in the vertical direction, wherein i) the fixed number in the horizontal direction has a fixed value of 2^5 and the dy number is determined from among {32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, - 26, -32}, or ii) the fixed number in the vertical direction has a fixed value of 2^5 and the dx number is determined from among {32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, -26, - 32} according to the intra prediction mode of the current block.