A digital image is made up of pixels.
It does not contain
any references to physical dimensions - like inches or centimeters.
But it can contain metadata called ppi - pixels per inch - which can be used by printer drivers to calculate the printed size. For on-screen viewing, ppi is irrelevant. If you post an image on the web, it will display exactly the same regardless of what the ppi is set to. Even if you're viewing it in Photoshop, Lightroom or any other image viewer, the ppi is still irrelevant - it only comes into play when printing.
Ppi is often referred to as "resolution", but that's only valid in the context of printing. The only numbers that correctly describe the resolution of an image are pixel dimensions. File size is not an indicator of resolution - a 6000 x 4000 image could be 30 MB as a raw file, 137 MB as a 16-bit tiff, and 14 MB or smaller as a jpg.
Don't confuse megabytes (file size) with megapixels (the total number of pixels in an image). A 24 megapixel camera takes pictures containing 24 million pixels - 6000 x 4000.
The image above measures 300 x 450 pixels.* To print this image, the printer driver will divide the pixel dimensions by the ppi value to calculate the printed dimensions. Let's say the ppi is set to 300.
300:300 = 1 - and 450:300 = 1.5 - so the print will be 1 x 1.5 inches, or roughly 2.5 x 3.75 cm.
If the ppi is set to a lower value, it will print bigger, and if set to a higher value, it will print smaller.
You can assign physical dimensions to an image in Photoshop (or in the Export dialog in Lightroom), but you are really only changing the pixel dimensions - which along with the ppi is used to calculate the physical size. There are still no physical dimensions associated with the image - only pixel dimensions and ppi - which is all that's required. But Photoshop does the math for you and displays the physical dimensions.
When setting physical dimensions, you would normally check Resample in the Image size dialog in Photoshop, or check Resize to fit in Lightroom's Export dialog - unless you want to print the image full size.
It's useful to know how big you can print an image without enlarging it. Some enlargement (upscaling) will be OK, but the more you enlarge, the more quality will suffer.
The image above was taken with a 24 megapixel camera. (1 megapixel = 1 million pixels) At 300 ppi a full size image will print at 20 x 13.3 inches. If you want to make a bigger print (at 300 ppi), there aren't enough pixels, and the missing pixels will have to be invented by interpolation. This will inevitably degrade the image, which may or may not be acceptable. An alternative would be to print at a lower ppi like 240 or 200, which would allow for making a bigger print without enlarging the image. (do the math to find out how big) But printing with a lower ppi may also affect quality - to find out what's best make two versions of the image, and print both of them. Comparing the two versions at 100% view can also be a help, but it's somewhat tricky because they won't be the same pixel dimensions.
Generally, when evaluating an image (sharpness, noise, general quality), 100% is the only reliable view. Any other view will be inaccurate and misleading, due to the scaling of the image. If you make a large image fit in window, the apparent quality may change, depending on which application you're using and the percentage the image has been scaled to. So get into the habit of always using 100% - where one image pixel is represented by one display pixel.
Images from a digital camera will be in the RGB image mode - which is made up of three channels - red, green and blue. Other common modes include CMYK (four channels, used for offset printing) and Greyscale (one channel).
All these modes can have different bit depths - like 8 bits per channel and 16 bits per channel. 8-bit images have 256 shades, or levels of color per channel, for RGB that means that the image can contain 256 x 256 x 256 = 16.7 million colors. 8-bit RGB is sometimes referred to as 24-bit, 16-bit RGB is sometimes referred to as 48-bit.
16-bit files are always twice the file size of an 8-bit file with the same dimensions. 16-bit uses 65,536 levels of each color per channel which adds up to a total of 281 trillion colors for RGB. The human eye can only distinguish around 10 million colors, so you may wonder what the point is with 16-bit. The answer is that it gives you editing headroom. If you do heavy editing on an 8-bit image, you'll lose a lot of the original levels in the image, which will lead to banding - tranistions between shades are no longer smooth - and the histogram will look like a comb because of the missing levels. Heavy editing on a 16-bit file, on the other hand, will not have any detrimental effect.
For a detailed
discussion of bit depth, see The Benefits Of Working With 16-Bit Images In Photoshop
A histogram is a graphical representation of how tones are distributed in an image. The horizontal axis represents the tonal variations from dark (left) to light (right), while the vertical axis represents the number of pixels in that particular tone. Histograms in Photoshop and Lightroom also show how the individual channels are distributed.