Post by Wolfgang HugemannPost by Glenn LindermanIs it Windows or convert that is expanding your glob for you? In that
same directory, try
echo *.jpg
and see how many files are listed.
I can't tell; I just note that it's working. The command line above does
not work under Windows; it will just echo the exact string, i.e.
"*.jpp". But you can do things like 'dir *.jpg' and Windows will list
all files with the extension "jpg".
So if it were the Windows shell doing the expansion, it would happen
even for the echo command, is the point, and such does happen on Unix.
On Windows, each command or program that wants to deal with glob
expansion has to do it itself. Some do, some don't.
Post by Wolfgang HugemannPost by Glenn LindermanSo is the difference in the image blob, or in the EXIF tags (which might
get stripped on the way in to the PDF?)? How different is the size (a
few bytes? 10%? or ?)?
The difference in size is only very slight, about 1%, and it is not due
to excessive data being stripped off. The image content is actually
slightly different. I compared the two images via
convert original.jpg extracted.jpg -compose difference -composite
comparison.png
and then counted the colours.
A difference in color count does indicate a difference in image content
(although the same color count would not prove identical image
content). So you have proven that ImageMagick is expanding and
recompressing the images in this particular case, which is typical of
its processing style.
Post by Wolfgang HugemannPost by Glenn LindermanPost by Wolfgang HugemannI suspect that ImageMagick somehow re-encoded the JPEGs before it wrapped them into the PDF.
You might be right, because IM tends to decompress images to full
bitmaps before doing pretty much anything to them.
Post by Wolfgang HugemannIs there a way to tell ImageMagick to leave the JPEGs as they are and just to wrap them into a PDF?
It would be great if there would be a "preserve" option or alike. When
combining several JPEGs to a PDF, there really is no use in re-encoding
the JPEGs if you apply no modifications to them.
Not only is there no benefit to the re-encoding, there are actually two
problems that result: it takes more processor power, and every
re-encoding loses a bit of quality.
Post by Wolfgang HugemannI checked with Adobe Acrobat and it does the trick of merging several
JPEGs to one PDF, with the extracted JPEGs being exactly identical to
their originals. There also seems to be other proprietary software that
does the trick of bulk-converting JPEGs to PDF, but no freeware tool.
The populat PDFsam does not take other formats than PDF as input.