PNG to PDF without recompress

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
narcisgarcia
Posts: 3
Joined: 2013-07-01T01:00:54-07:00
Authentication code: 6789

PNG to PDF without recompress

Post by narcisgarcia »

I'm getting very small PNG files with optipng, and want to collect them into a PDF file.
I see that this command:

Code: Select all

convert *.png test1.pdf
...recompresses each image, and not so efficiently as the optipng result.

- For 20 pages saved with GIMP (total 7.6MB) imagemagick generates a PDF of 4.1MB
- For the same 20 pages reduced with optipng (total 3.5MB) imagemagick generates a PDF of 4.1MB

I want to take beneffit of the file reduction with optipng before generating a PDF of similar size.
How to do it?

Another question: adding "-compress LZW" is the only way to guarantee lossless conversion? Is there any "copy" type of compression?
Post Reply