The present invention provides an image-forming device that can record an
image onto a rewritable image recording medium. Prior to recording a
predetermined image, the medium is set and a test image for measuring the
density is recorded thereon. When the density is determined to be within
an allowable range, the predetermined image is recorded under certain
image recording conditions and then discharged to a discharging tray.
However, should the density be outside the allowable range, the
conditions are changed and another test image is recorded to the medium.
If after repeated density measurements the density is not within an
allowable range, the device determines that the medium is defective and
discharges it to an error tray.