I have an image with some sources in it. I need to get the pixel size and beam size of that image. How can I calculate it?
If you know the angular size of your image (e.g., 10", 1' etc), then pixel size (in "/pixel units) is just image size / number of pixels. For beam size, depends a lot on the wavelength-range of your observations (for instance sub-mm/radio observations are conceptually very different from UV/optical), but to have an idea of the beam/psf size, you can fit a 2D gaussian/moffat profile to the emission of a point-like object (i.e., a star) in the field of your image.
Note that most of the time these info are contained in the header.
Pixel size is usually (beamsize/3). Based on the axes and number of pixels, you can find out pixel size by doing pixel_size = image size(in arcsec) / number_of_pixels.
Usually, the image is done by first finding the beamwidth of the telescope and then putting 3-5 pixels inside a beamwidth in any axis.
You can estimate the pixel size just from the number of pixels if you know the scale of your image or certain object in the image, but really you should already know this and the beamsize (which you could take a guess at but can't be sure). This information should be given with the image by whoever actually made it. If you have a data file it may be in the headers, or if you got the image from a website check the caption for details or an original source.