I have two images, both are 2550 by 3300 pixels, which is 8.5 by 11 inches if printed at 300 DPI, but whereas the first image is 300 DPI, the second is only 72 DPI.
The official help page of the identify
command shows how to get the image’s print size in inches, and if we are going to print the image at 300 DPI, the command seems to be
magick identify -format "%[fx:w/300] by %[fx:h/300] inches" document.png
But why does it returns the same print size for both images?
magick identify -format "%f: %wx%h pixels, %xx%y dots per inch, %[fx:w/300] by %[fx:h/300] inches at 300 DPIn" "letter*.jpg"
letter-072-dpi.jpg: 2550x3300 pixels, 72x72 dots per inch, 8.5 by 11 inches at 300 DPI
letter-300-dpi.jpg: 2550x3300 pixels, 300x300 dots per inch, 8.5 by 11 inches at 300 DPI
I was sure that because the images have different DPI, their print sizes should be different as well, that is, 8.5 by 11 inches for the 300 DPI image, but something different for the 72 DPI one. It seems I was wrong?