A semiconductor package. The semiconductor package of the invention
comprises: a substrate comprising at least one exposed area with
photosensitive devices; a cover for isolating the exposed area from the
external atmosphere, wherein one of either the substrate or the cover is
a base, and the other is a top structure; and a dam formed on the base to
form a cavity, wherein the top of the dam has a recess, the dam is
attached the top structure by an adhesive, and the cavity corresponds to
the exposed area.