<p>In a moving image coder for coding each of a plurality of blocks obtained by dividing an input image, an effective area that can be referenced in an inter-frame coding reference image is defined. A reference area is detected that should be referenced for the inter-frame coding of a target block in the reference image. For the reference area belonging to the effective area, an image in the above reference area is outputted. For the reference area not belonging to the effective area, a prediction image for the inter-frame coding is generated by outputting a supplemental image. The input image is coded by using the prediction image.</p>