The objective of this work is to obtain an extinction-corrected distribution of optical surface brightness and colour indices of the large nearby galaxy M 31 using homogeneous observational data and a model for intrinsic extinction. We process the Sloan Digital Sky Survey (SDSS) images in ugriz passbands and construct corresponding mosaic images, taking special care of subtracting the varying sky background. We apply the galactic model developed in Tempel et al. (2010) and far-infrared imaging to correct the photometry for intrinsic dust effects. We obtain observed and dust-corrected distributions of the surface brightness of M 31 and a map of line-of-sight extinctions inside the galaxy. Our extinction model suggests that either M 31 is intrinsically non-symmetric along the minor axis or the dust properties differ from those of the Milky Way. Assuming the latter case, we present the surface brightness distributions and integral photometry for the Sloan filters as well as the standard UBVRI system. We find the following intrinsic integral colour indices for M 31: (U-B)_0=0.35; (B-V)_0=0.86; (V-R)_0=0.63; (R-I)_0=0.53; the total intrinsic absorption-corrected luminosities of M 31 in the B and the V filters are 4.10 and 3.24 mag, respectively.