1. A method of decoding image, the method comprising: extracting from a bitstream information that indicates an intra prediction mode applied to a current prediction unit to be decoded; determining reference pixels from among neighboring pixels adjacent to the current prediction unit and filtered neighboring pixels filtered from the neighboring pixels, based on a size of the current prediction unit and an intra prediction mode of the current prediction unit; performing intra prediction in the intra prediction mode on the current prediction unit using the extracted information and the determined reference pixels.