1. A method of intra predicting an image, the method comprising: acquiring prediction mode information indicating one selected from a group comprising an inter mode and an intra mode, and intra prediction mode information indicating one selected from a group comprising directional prediction modes and a planar mode from a bitstream; determining a prediction mode of a current block according to the prediction mode information and the intra prediction mode information; acquiring reference samples including a first corner sample, a second corner sample, a first side sample, and a second side sample, the reference samples used for prediction of a current sample; determining a prediction value of the current sample to be a weighted sum of sample values of the first corner sample, the second corner sample, the first side sample, and the second side sample, a size value of a current block and a location value of the current sample, if the prediction mode of the current block is determined to be the planar mode; and restoring an original value of the current sample by using the prediction value of the current sample and residual data indicating a difference between the original value and the prediction value of the current sample, wherein the first corner sample is located at an intersection of a row to an upper side of the current block and a column to a right side of the current block, wherein the second corner sample is located at an intersection of a row to a lower side of the current block and a column to a left side of the current block, wherein the first side sample is located at an intersection of a row in which the current sample is located and the column to the left side of the current block, wherein the second side sample is located at an intersection of the row to the upper side of the current block and a column in which the current sample is located, wherein weights for the weighted sum are determined based on a relative location of the current sample to the current block, wherein a weight for the first corner sample is determined to be a horizontal distance between the current sample and the first side sample, wherein a weight for the first side sample is determined to be a horizontal distance between the current sample and the first corner sample, wherein a weight for the second corner sample is determined to be a vertical distance between the current sample and the second side sample, and wherein a weight for the second side sample is determined to be a vertical distance between the current sample and the second corner sample.