Page 1 of 1

Convert format to standard output

Posted: 2008-08-21T07:06:17-07:00
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.

Re: Convert format to standard output

Posted: 2008-08-21T07:39:58-07:00
by magick
Try this command:
  • convert foo.jpg bmp:-
To convert JPEG to BMP on standard out.

Re: Convert format to standard output

Posted: 2008-08-21T10:09:01-07:00
by ghell
Thanks, that did the trick :)