A method for coding image data on a block-by-block basis, said method comprising: partitioning the image data into a plurality of blocks; generating a predicted block by predicting a current block that is one of the plurality of blocks; computing a difference between the current block and the predicted block; coding the difference computed in said computing; decoding the difference coded in said coding; and adding the difference decoded in said decoding to the predicted block to generate a decoded block, wherein said generating step includes: detecting an edge in a previously decoded block adjacent to the current block; determining whether or not the detected edge is pointing to the current block; and if the detected edge is determined to be pointing to the current block and if a line through a pixel that is to be predicted within the current block and parallel to the detected edge crosses the left border of the current block as well as the upper border of the current block or the upper border of a block positioned to the right of the current block, interpolating previously decoded image data along a direction of the detected edge to generate the predicted block, the previously decoded image data corresponding to pixels included in blocks adjacent to the current block, wherein the interpolating of previously decoded image data includes determining a first fractional reference position where said line crosses the upper border of the current block or the upper border of a block positioned to the right of the current block, computing a first reference value at the first reference position by linearly interpolating two first reference pixels surrounding the first reference position, said first reference pixels being included in previously decoded blocks positioned above or to the upper right of the current block, determining a second fractional reference position where said line crosses the left border of the current block, computing a second reference value at the second reference position by linearly interpolating two second reference pixels surrounding the second reference position, said second reference pixels being included in a previously decoded block positioned to the left of the current block, computing an interpolated value by linearly interpolating the first reference value and the second reference value, and using the interpolated value as a predicted value of the pixel to be predicted. partitioning the image data into a plurality of blocks; generating a predicted block by predicting a current block that is one of the plurality of blocks; computing a difference between the current block and the predicted block; coding the difference computed in said computing; decoding the difference coded in said coding; and adding the difference decoded in said decoding to the predicted block to generate a decoded block, wherein said generating step includes: detecting an edge in a previously decoded block adjacent to the current block; determining whether or not the detected edge is pointing to the current block; and if the detected edge is determined to be pointing to the current block and if a line through a pixel that is to be predicted within the current block and parallel to the detected edge crosses the left border of the current block as well as the upper border of the current block or the upper border of a block positioned to the right of the current block, interpolating previously decoded image data along a direction of the detected edge to generate the predicted block, the previously decoded image data corresponding to pixels included in blocks adjacent to the current block, detecting an edge in a previously decoded block adjacent to the current block; determining whether or not the detected edge is pointing to the current block; and if the detected edge is determined to be pointing to the current block and if a line through a pixel that is to be predicted within the current block and parallel to the detected edge crosses the left border of the current block as well as the upper border of the current block or the upper border of a block positioned to the right of the current block, interpolating previously decoded image data along a direction of the detected edge to generate the predicted block, the previously decoded image data corresponding to pixels included in blocks adjacent to the current block, wherein the interpolating of previously decoded image data includes determining a first fractional reference position where said line crosses the upper border of the current block or the upper border of a block positioned to the right of the current block, computing a first reference value at the first reference position by linearly interpolating two first reference pixels surrounding the first reference position, said first reference pixels being included in previously decoded blocks positioned above or to the upper right of the current block, determining a second fractional reference position where said line crosses the left border of the current block, computing a second reference value at the second reference position by linearly interpolating two second reference pixels surrounding the second reference position, said second reference pixels being included in a previously decoded block positioned to the left of the current block, computing an interpolated value by linearly interpolating the first reference value and the second reference value, and using the interpolated value as a predicted value of the pixel to be predicted.