Page 1 of 1
Broken pipe error
Posted: 2015-04-08T10:48:56-07:00
by Salsalex2011
Hello hello,
New user to IM, I try to compare 2 images and showing the resulting in IMDisplay directly (without creating a file)
After searches I still cannot understand the reason of below error:
D:\DATA>compare.exe "image1.bmp" "image2.bmp" miff:- | imdisplay.exe
This just show IMdisplay with not content then, after I closes it, shows the error message:
compare.exe: unable to write blob `-': Broken pipe @ error/blob.c/ImageToFile/1730.
I'm running IM 6.9.0 Q16 64 bits on a dos command box on win 7 pro 64bits.
Are there some setup to allow pipe ? or any other trick ?
Thanks for any help
ALeX
Re: Broken pipe error
Posted: 2015-04-08T11:37:43-07:00
by snibgo
I confirm your command doesn't work, on IM v6.9.1-0. Both of the following alternatives do, using imdisplay:
Code: Select all
compare rose: rose: show:
compare rose: rose: miff:- |convert - show:
Re: Broken pipe error
Posted: 2015-04-08T11:51:24-07:00
by fmw42
I do not know much about windows nor imdisplay.exe, but do you not need a - for standard in when using a pipe to some display command to tell it to retrieve the standard out from the miff:-. So something like
Code: Select all
compare.exe "image1.bmp" "image2.bmp" miff:- | imdisplay.exe -
Re: Broken pipe error
Posted: 2015-04-08T12:07:15-07:00
by snibgo
I should have mentioned: I tried ...
Code: Select all
compare rose: rose: miff:- |imdisplay -
... but it doesn't work. imdisplay runs, but with no image, and we get the message:
Code: Select all
compare.exe: unable to write blob `-': Broken pipe @ error/blob.c/ImageToFile/1730.
These two also don't work:
Code: Select all
f:\web\im>%IM%convert rose: miff:- |%IM%imdisplay -
convert.exe: unable to write blob `-': Broken pipe @ error/blob.c/ImageToFile/1730.
f:\web\im>%IM%convert rose: miff:- |%IM%imdisplay
convert.exe: unable to write blob `-': Broken pipe @ error/blob.c/ImageToFile/1730.
The workaround, as in my first post, is to use "show:", or use convert on the right side of the pipe.
Re: Broken pipe error
Posted: 2015-04-08T14:28:08-07:00
by fmw42
Try png:- or or tiff:- and see if they work. It could be a miff: issue
Re: Broken pipe error
Posted: 2015-04-08T14:31:58-07:00
by fmw42
Just curious, but I thought show: was a unix only tool. But perhaps I am wrong. Perhaps you can configure the delegates.xml file to use imdisplay or some windows tool to display the image when show: is used. If so, it might be useful to others to know how you did the configuration. I presume you are using show: outside Cygwin. But does it work in Cygwin along with x: if X11 delegate is installed. It might be nice to add something to the docs at
http://www.imagemagick.org/Usage/windows/
Re: Broken pipe error
Posted: 2015-04-08T14:48:53-07:00
by snibgo
Tiff:- and png:- don't work here. I suspect imdisplay isn't reading from stdin.
I don't use or know X.
show: and win: both work in pre-built binaries of recent IM versions, under Windows, with no changes required.
Re: Broken pipe error
Posted: 2015-04-08T16:42:51-07:00
by fmw42
snibgo wrote:
show: and win: both work in recent IM versions, under Windows, with no changes required.
Nice to know. Perhap Dirk fixed them. I never thought that show: would work with Windows.
Thanks
Re: Broken pipe error
Posted: 2015-04-08T22:04:03-07:00
by dlemstra
Magick enabled this two years ago, he should get the credits. IMDisplay can only read from a file and has no support for reading from stdin at the moment. I will bookmark this topic and see if I can add support for this at some point
Re: Broken pipe error
Posted: 2015-04-08T22:29:50-07:00
by Salsalex2011
Thanks all for all these feedbacks
I have no problem with show: indeed, that's my current workaround. But I need to use IMDisplay (or maybe something else) in order to control better the displayed picture (eg show full screen or window sized properly to fit the full content (no need to scroll))...
Cannot try yet your tips, I'll do later today and let you know my findings, if any.
Thanks again
Re: Broken pipe error
Posted: 2015-04-09T10:25:15-07:00
by Salsalex2011
Dear All,
Well, it's ok with convert instead of IMdisplay. Seems to confirm the pipe is not possible with it.
But I still don't know yet how to open the window in IMdisplay so that it is maximized and the size of the IMdisplay window itself is large enough to contain the full picture without any need of scrollbars...
Any idea is welcome - I'd like to avoid playing with delegate for now... if possible.
Thx
ALeX
Re: Broken pipe error
Posted: 2015-04-09T15:07:26-07:00
by snibgo
Salsalex2011 wrote:But I still don't know yet how to open the window in IMdisplay so that it is maximized and the size of the IMdisplay window itself is large enough to contain the full picture without any need of scrollbars...
I don't think that is possible with IMdisplay.
I have set up IM so converting to "msph:" uses Microsoft Photo Viewer, which by default reduces an image to fit in the window.
The MS Photo Viewer command line is horrible. The input file must include the full path, with backslashes, not forward slashes. This is awkward (impossible?) to do directly in delegates.xml. So I do it via a BAT file.
msph.bat is in a directory in my %PATH%. It contains a single line:
Code: Select all
rundll32.exe "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen %~dpnx1
c:\users\Alan\.magick\delegates.xml contains:
Code: Select all
<delegate decode="png" encode="msph" command="msph.bat %i"/>
Re: Broken pipe error
Posted: 2015-04-11T19:01:02-07:00
by Salsalex2011
Thanks fro the idea, I'll try it
Re: Broken pipe error
Posted: 2016-05-10T23:43:18-07:00
by marcomarsala
Personally, I'm still experiencing "Broken pipe error" on Linux with IM 6.7 whil converting in tif format from the CLI
Re: Broken pipe error
Posted: 2016-05-11T06:44:42-07:00
by snibgo
@marcomarsala: I don't know if your post is serious. Unless you tell us the version of IM you use, and what command you use, and what happens instead, no advice is possible.