convert cannot handle large files from stdin

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
amay
Posts: 3
Joined: 2017-08-18T11:45:58-07:00
Authentication code: 1151

convert cannot handle large files from stdin

Post by amay »

Was trying to convert a .xwd file into a png using the following command:

cat image.xwd | convert xwd:- png:-

Regardless of the size of image.xwd, only 139264 bytes are read by convert and the resulting image is garbage. Bug is only seen in CentOS 7, CentOS 6 version is fine.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert cannot handle large files from stdin

Post by fmw42 »

why are you trying to do that? You can simply put the filename in the convert command. Does that even work?

Does it work as

Code: Select all

cat image.xwd | convert xwd:- tmp.png
What are your IM versions and dates of the versions?

According to http://fileformats.archiveteam.org/wiki/XWD, there are two version of .xwd. If the direct command does not work, then perhaps IM only handles one of them.
amay
Posts: 3
Joined: 2017-08-18T11:45:58-07:00
Authentication code: 1151

Re: convert cannot handle large files from stdin

Post by amay »

No, it still doesn't work when writing to a file. It does work when the file name is given in the command.

We are attempting to pipe the output of a screen capture through convert to reduce network load, as it's being sent to another machine.

The version that doesn't work:
ImageMagick-6.7.8.9-15.el7_2.x86_64

Version on CentOS 6 machine that does work:
ImageMagick-6.5.4.7-7.el6_5.x86_64

This problem is only seen when the data is sent quickly to convert. When data is pulled from an xwd command, the data is fed slowly enough that this failure only happens about 1% of the time.
amay
Posts: 3
Joined: 2017-08-18T11:45:58-07:00
Authentication code: 1151

Re: convert cannot handle large files from stdin

Post by amay »

I just installed the most recent version 7.0.6-7 and this bug has been fixed.
Post Reply