Re: gm in pipe

Bob Friesenhahn <[email protected]> Wed, 30 Jan 2008 09:52:17 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
On Wed, 30 Jan 2008, Patrick Welche wrote:

> Another oddity with GM from yesterday's CVS (I haven't looked at GM for
> a few years though): I used to be able to
>
>  cat orig.jpg | gm display
>
> but now I get "cat: stdout: Broken pipe". (It still works with my old
> copy.)

This is on purpose. :-)

I did post to one of the GraphicsMagick lists about it. 
GraphicsMagick was using isatty() to try to guess if the input was 
from a pipe.  Unfortunately, it is perfectly reasonable to start 'gm 
display' using something other than a character terminal and this was 
causing problems.

Use this (more correct) syntax instead:

   cat orig.jpg | gm display -

or

   cat orig.jpg | gm display JPEG:-

in case the format auto-detect does not work.

Bob
======================================
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/