An image-processing procedure that assures correct determination of the magnetic field distribution of magneto-optical images is presented. The method remedies image faults resulting from sources that are proportional to the incident light intensity, such as different types of defects in the indicator film and unevenness of light, as well as additive signals from detector bias, external light sources, etc. When properly corrected a better measurement of the local magnetic field can be made, even in the case of heavily damaged films. For superconductors the magnetic field distributions may be used for accurate determination of the current distributions without the spurious current loops associated with defects in the films. (C) 2003 American Institute of Physics.