  We describe a new, direct method for determining the opacity of foreground
galaxies which does not require any a priori assumptions about the spatial
distribution or the reddening law of the obscuring material. The method is to
measure the colors and counts of background galaxies which can be identified
through the foreground system. The method is calibrated, and the effects of
confusion and obscuration are decoupled by adding various versions of a
suitable deep reference frame containing only field galaxies with known
properties into the image of the foreground galaxy, and analyzing these
``synthetic field'' images in the same way as the real images. We test the
method on HST WFPC2 archived images of two galaxies which are quite different:
NGC 4536 is a large Sc spiral, and NGC 3664 is a small Magellanic irregular.
The reference frames are taken from the Hubble Deep Field.
  From the background galaxy counts, NGC 4536 shows an extinction A_I ~ 1 mag
in the northwestern arm region, and lower than 0.5 mag in the corresponding
interarm region (no correction for inclination has been attempted). However,
from the galaxy colors, the same reddening of E(V - I) ~ 0.2 is observed in
both the arm and the interarm regions. In the interarm region, the combination
of extinction and reddening can be explained by a diffuse component with a
Galactic reddening law (R_V ~ 3). In the spiral arm, however, the same diffuse,
low opacity component seems to coexist with regions of much higher opacity.
Since the exposures are shorter the results for NGC 3664 are less clear, but
also appear to be consistent with a two component distribution.
