Page 1 of 1

Identify -verbose: print size and resolution differ from original

Posted: 2017-04-10T23:50:51-07:00
by maen
Hello @all,
I want to test size & resolution of pdfs with pdfimages and identify -verbose all.
OS: ubuntu 16.04
Imagemagick: 6.8.9.9-7
Poppler: 0.41

The problem is that although the size of the image is always correct, the print size and the resolution are not correct calculated.

For testing purposes, I took:
Image

Original data:
Image: Mono_Lake_Tufa_300DPI.JPG
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 5184x3456+0+0
Resolution: 300x300
Print size: 17.28x11.52

Units: PixelsPerInch [...]

Now the tricky part: Creating pdfs, extract images, identify images.

Extracting the data with pdfimages -all ...

1. Creating pdf with Gimp. Gimp seems to convert the JPG into png.
identify -verbose -units PixelsPerInch images-000.png |more

images-000.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 5184x3456+0+0
Resolution: 71.98x71.98 -> Factor 0.24 from Original
Print size: 72.02x48.0133 -> Factor 4.166 from Original
Units: PixelsPerInch

2. Creating pdf with Photoshop. Also converting the JPG into png without asking!
identify -verbose -units PixelsPerInch images-000.png |more
images-000.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 5184x3456+0+0
Resolution: 71.98x71.98 -> Factor 0.24 from Original
Print size: 72.02x48.0133 -> Factor 4.166 from Original
Units: PixelsPerInch

3. Creating pdf with Adobe Indesign. Does not convert into PNG.
identify -verbose -units PixelsPerInch images-000.jpg |more
Image: images-000.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 5184x3456+0+0
Units: PixelsPerInch
No Resolution, no Print Size set!

Question:
Could this be a problem of ImageMagick or a poppler Problem?

THX in advance,

Marc

Re: Identify -verbose: print size and resolution differ from original

Posted: 2017-04-11T08:19:06-07:00
by snibgo
maen wrote:Could this be a problem of ImageMagick or a poppler Problem?
What problem?

You have a JPG. You use Gimp, PS and Indesign to make PDFs, then use pdfimages to extract images, which you examine with identify. None of the results have the resolution of the input.

You can confirm the identify result with exiftool. I expect you will find it gives the same results.

The obvious conclusion is that Gimp, PS and Indesign do different things to the metadata of the image, when making the PDF.

Re: Identify -verbose: print size and resolution differ from original

Posted: 2017-04-12T01:42:03-07:00
by maen
ok, thank you.