  We derive an estimator of weak gravitational lensing shear from background
galaxy images that avoids noise-induced biases through a rigorous Bayesian
treatment of the measurement. The derived shear estimator disposes with the
assignment of ellipticities to individual galaxies that is typical of previous
approaches to galaxy lensing. Shear estimates from the mean of the Bayesian
posterior are unbiased in the limit of large number of background galaxies,
regardless of the noise level on individual galaxies. The Bayesian formalism
requires a prior describing the (noiseless) distribution of the target galaxy
population over some parameter space; this prior can be constructed from
low-noise images of a subsample of the target population, attainable from long
integrations of a fraction of the survey field. We find two ways to combine
this exact treatment of noise with rigorous treatment of the effects of the
instrumental point-spread function and sampling. The Bayesian model fitting
(BMF) method assigns a likelihood of the pixel data to galaxy models (e.g.
Sersic ellipses). The Bayesian Fourier domain (BFD) method compresses the pixel
data to a small set of weighted moments calculated after PSF correction in
Fourier space. A numerical test using a simplified model of a biased galaxy
measurement process demonstrates that the Bayesian formalism recovers applied
shears to $<1$ part in $10^3$ accuracy and provides accurate uncertainty
estimates. BFD is the first shear measurement algorithm that is model-free and
requires no approximations or ad hoc assumptions in correcting for the effects
of PSF, noise, or sampling on the galaxy images. These algorithms are good
candidates for attaining the part-per-thousand shear inference required for
hemisphere-scale weak gravitational lensing surveys. (abridged)
