We present a method to estimate the contribution of line opacity to the tot
al opacity as a function of wavelength. The estimated line-opacity function
can then be used to simulate line-blanketing in NLTE radiative transfer ca
lculations. Given a reference flux distribution (either observed or theoret
ical), our method allows to obtain a good estimate of the spectrum without
the need for considering in detail all the millions of lines contributing t
o line blanketing. We applied the method to the spectra computed from a sam
ple of photospheric models with effective temperatures T-eff = 4200, 5200 a
nd 6200 K, log g = 4.0, 4.5, 5.0 and [A/H] = 0.0, 1.0, -2.0, taken from the
NextGen database (Allard & Hauschildt 1995). The computed flux distributio
ns agree quite well with the corresponding LTE line-blanketed NextGen fluxe
s when we introduce the estimated line-opacity contribution as a multiplica
tive factor of the continuum opacity in the radiative transfer calculations
. In particular we discuss the importance of a correct estimate of the cont
inuum flux, mainly in the UV, in the NLTE formation of the Ca II H & K, the
Ca ii InfraRed Triplet (IRT: lambda = 8498, 8542, 8662), Na I D, Li I and
KI resonance lines.