It's my understanding that
pdfimages -all extracts images from PDFs in their native formats.
Therefore, I expected that the JPG (lossy) images extracted from that command would have the same pixel information as the .ppm and .pbm files produced without the
-all option, as well as the PNG (lossless) files created when I right-click and save the image in Evince.
However, my use of the ImageMagick
compare command tells me that there are differences in the images contained within the JPG files compared to the other options above.
To reproduce, download the PDF in this link (https://fccid.io/document.php?id=2149405), use it as an argument for
pdfimages -all and use the first .ppm file and the first .jpg file as arguments for
compare. When I do this, it produces an image file containing red to indicate a difference in the images.
Is there something that I don't understand? Is
pdfimages adding pixel information by default when it creates .ppm and .pbm files?