Page 1 of 1

forcing output file format on stdout

Posted: 2008-01-31T19:03:19-07:00
by mobu
Hello,

I am using the convert program to run image files through a pipe line:

Code: Select all

previous_stage_in_pipeline | convert -filteroptions | next_stage_in_pipline
convert makes this easy, just by specifying '-' as the input and output filenames.

However, in all the examples I can find, the file formats are implied by the filename, and in my case I am not handling any filenames, just the data. How can I force the output file format to something specific? For example, how do I force the output to be a JPG if there is something like a PNG on the input side of the pipeline?

... mobu

Re: forcing output file format on stdout

Posted: 2008-01-31T19:14:03-07:00
by magick
Try jpeg:-.

Re: forcing output file format on stdout

Posted: 2008-01-31T19:18:33-07:00
by mobu
Seems to work! Thanks for the tip!
... mobu