Page 1 of 1

convert cannot handle large files from stdin

Posted: 2017-08-18T11:49:36-07:00
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.

Re: convert cannot handle large files from stdin

Posted: 2017-08-18T11:57:00-07:00
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.

Re: convert cannot handle large files from stdin

Posted: 2017-08-18T12:04:19-07:00
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.

Re: convert cannot handle large files from stdin

Posted: 2017-08-18T12:35:44-07:00
by amay
I just installed the most recent version 7.0.6-7 and this bug has been fixed.