Page 1 of 1

Reading a series of images from stdin

Posted: 2010-03-22T17:14:18-07:00
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...

Re: Reading a series of images from stdin

Posted: 2010-03-22T18:38:29-07:00
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.