Reading a series of images from stdin

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
Zheitk

Reading a series of images from stdin

Post by Zheitk »

Hi, I need to compress a scanned pdf of 100MB of size ( :shock: ) so I used GhostScript to convert it
to a series of jpeg files (of 20MB ñ_ñ)
The question is, ¿there's a way to send these jpeg to the stdin of ImageMagick, and convert it to a pdf?

Something like this pseudo-code:

Code: Select all

ghostscript [a lot of options] archivo.pdf -sOutputFile=%stdout -q - | convert - -adjoin archivo.pdf
I just tried a lot of ways, but it never work ¬_¬, and i can´t found anything about this...
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Reading a series of images from stdin

Post by magick »

JPEG is a single image per file so ImageMagick can only read one JPEG image from stdin. You can pass multiple PNM images, for example, because the PNM format supports multiple frames.
Post Reply