Why two apps show different print sizes
One photo, two programs, two print sizes. The pixels did not change between them — the file simply records its resolution in two places, and the programs read different ones.
Two headers, one picture
A JPEG file is a sequence of segments before the compressed picture begins. Two of them can carry a resolution. The JFIF header (APP0) has a density field: a unit — inches, centimetres, or none — and a horizontal and vertical value. The Exif block (APP1), written by cameras and phones, has its own XResolution, YResolution and ResolutionUnit tags in its first directory.
Nothing in the JPEG standard says which wins when they differ. Some applications read Exif first, some read JFIF, some read whichever they find, and some ignore both and assume 72 or 96. So a file that says 72 in Exif and 300 in JFIF is two different documents to two different programs — even though every pixel in it is the same.
