1. A method for encoding an image having a resolution that is not a multiple of a size of a block to be encoded, comprising: adding, by a processor, an extension image to the image to generate an image to be encoded, the extension image being an image to be added to the image and being an image in which a boundary pixel that is present at a boundary between the extension image and the image, and an adjacent pixel that is adjacent to the boundary pixel have a difference in pixel value therebetween that has an absolute value that is equal to or greater than a certain value; and disabling a deblocking filter process at the boundary between the extension image and the image in a locally decoded image that corresponds to the image to be encoded.