If you're using something like an SBIG camera to make the photo, you can measure the magnitude photometrically. A CCD imager "integrates" the charges from individual photons interacting with the chip's "charge wells." You can use the raw image to "count" photons in this way if you know the chip's quantum efficiency. Software like MaxIM DL often includes routines to estimate magnitudes very accurately in this way.
Otherwise, what I do is look up the field of view on SIMBAD or other DBs that are linked to the Digital Sky Survey or other faint-magnitude source.
With SIMBAD (just Google that) you can look up a known star by name or SAO designation, etc., and display a field of view. Other stars in that field of view which already have a designation can be identified and then looked up in the DB to find their magnitudes.
Estimating magnitudes based on other known stars in the FoV is an interesting exercise, and it can train your eye. It's a little different when working with photos, because you don't know the linearity of the imager or film used to make the photo. But one way to do it is to enlarge the image and count the pixels in the diameter of the two stars, then extrapolate the unknown one from the known one. This method is reasonable if you have more than one known magnitude in the FoV and they're several magnitudes apart. Comparing their measured pixel-widths to the differences in magnitude can give you a better scale to go by for extrapolation if you have several stars to use as a reference, instead of a single star.
Variable-star observers use this method "live" and can estimate to within about two-tenths of a magnitude reliably, once they have the experience.