forcing output file format on stdout

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
mobu

forcing output file format on stdout

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: forcing output file format on stdout

Post by magick »

Try jpeg:-.
mobu

Re: forcing output file format on stdout

Post by mobu »

Seems to work! Thanks for the tip!
... mobu
Post Reply