How can we talk about the â€œresolutionâ€ of a JPEG file?
A JPEG is characterised with three parameters: width (pixel), height (pixel) and bit depth (bits per pixel). And resolution is a characteristic for output devices, e.g., monitors or printers. Why? Resolution is measured in dots per inch or pixels per inch, with other words: the ratio of some discrete value to some unit of length.
As we can see from JPEG file properties, it also has a horizontal/vertical resolution. But how can we apply the concept of resolution to something that does not have a length? (It sounds funny for me to talk about a â€œJPEG file with a width of 5 inchesâ€.)
And another word to this is about user perception: Letâ€™s assume we have a JPEG image with a width of 1920â€¯px and we look at this picture on a monitor and an iPhone:
- 24-inch wide-screen computer monitor: 1920â€¯Ã—â€¯1200, 102.5 ppi
- iPhone 6 Plus: 1920â€¯Ã—â€¯1080, 401 ppi
So width is 1920â€¯px in both cases and each pixel of the image corresponds to exactly one pixel of the device. So if we choose to look at these screens from a distance such that we have the same ratio of pixels per degree of vision, we would have exactly the same quality (â‰ˆâ€¯70â€¯PPD).
So why can we talk about the resolution of JPEG?
Resolution means wildly different things to wildly different people. And a image has many resolution metrics. It has:
- A pixel resolution
- A Color resolution
- A Unit conversion resolution (PPI, DPI etc)
The there are some even odder rarely seen resolutions
Like the subpixel resolution of a lense on the sensor*
So the term resolution is heavily overloaded, and Very often misunderstood.
Images do not have physical unit resolutions on digital media
We have gone over this subject quite many times on this forum. And the consensus is that the physical measurement conversion values do not apply on digital media as long as they stay digital. So the resolution of a jpeg image is the amount of pixels you have. Because as you correctly put it different devices have different sizes.
Problem arises when you output stuff to physical media
The confusion arises because the technology of printing something to paper is wildly different form making images on screen. Now people from a print background will be somewhat obsessed with the resolution of the image. What they call resolution is actually just a conversion factor from pixels to physical units for their output device. (They have pixels to spare so they can output at different resolutions.)
This resolution is meaningless for screens. But people aren't entirely attuned to different mediums. So you commonly see some print designers design for screen as if it was a printer.
DPI is just metadata, its just a expression of wish that the printer place this image at this size. It's useful for many tasks so you don't always need to resize the image. But that's all it is.
But these guys came first so they have already manipulated perceptions so they have dibs on image resolution as a topic. Right or wrong.
* I'm just saying this because I have dealt with this kind of stuff.
The term resolution, generically, just refers to the level of detail an image has stored.
A high resolution image tends to have a lot more detail than a low resolution image.
The file resolution of a jpg is the number of pixels it has. The display resolution of a jpg has more to do with the screen or paper it is displayed on.
Based on your comment, it appears you're asking about the 'dpi' setting in the images meta data. That's the display resolution I mention above.
This is a number used to calculate how big the image should be when printed on paper.
A 300px x 300px image with a dpi setting of 100 would print out at 3 inches by 3 inches.
A 300px x 300px image with a dpi setting of 300 would print out at 1 inch by 1 inch.
In both cases, the image resolution is exactly the same. But the output (display) resolution is different.
But note that not all software will bother to do anything with the dpi setting. For instance, your web browser will ignore that data completely. Photoshop is one of the few programs that will obey it when you print directly from Photoshop.