Convert format to standard output

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
ghell

Convert format to standard output

Post by ghell »

I want to convert a JPG to a BMP.

Code: Select all

$ convert foo.jpg bar.bmp
works fine.

However, how can I convert to a BMP and pipe the output to standard out? I tried

Code: Select all

$ convert foo.jpg -
but obviously, it did not know that it was supposed to be converting to bmp and just output jpeg.

I assume that this has something to do with the "-format" argument but anything I tried to put in did not affect the output format and the same JPEG was returned.

I have tried looking at

Code: Select all

identify -list format
but I don't know what I am supposed to be taking from it. I have tried bmp, BMP, BMP*, "Microsoft Windows bitmap image", etc.

I am running ImageMagick 6.3.7 on Debian Lenny AMD64, if that helps.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Convert format to standard output

Post by magick »

Try this command:
  • convert foo.jpg bmp:-
To convert JPEG to BMP on standard out.
ghell

Re: Convert format to standard output

Post by ghell »

Thanks, that did the trick :)
Post Reply