2

I installed ImageMagick with pacman on Arch Linux. Now I try to compose two images like this:

convert \( -size 1x1 xc:black \) \( -size 1x1 xc:black \) -composite out.png

but it freezes at 100% CPU load. I need to kill it with ^C. As you see, it has nothing to do with input images size or anything, since I try to composite two 1x1 pixel in-memory images. ImageMagick's version:

$ convert --version
Version: ImageMagick 6.9.1-2 Q16 x86_64 2015-05-19 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC HDRI Modules OpenCL OpenMP
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma pangocairo png ps rsvg tiff webp wmf x xml zlib
rr-
  • 983

1 Answers1

1

Apparently this is a known issue with OpenMP, a library that provides multi-threading support and is compiled into ImageMagick by default.

To work around this, I downloaded and then extracted ImageMagick's sources:

wget ftp://ftp.imagemagick.org:21/pub/ImageMagick/ImageMagick-6.9.1-2.tar.gz -O - | tar xzv

Then compiled it like this:

cd ImageMagick-6.9.1-2
./configure --disable-openmp
make
sudo make install

so that my version looked like this:

$ /usr/local/bin/convert --version
Version: ImageMagick 6.9.1-2 Q16 x86_64 2015-05-24 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC
Delegates (built-in): bzlib fftw fontconfig freetype jng jpeg lcms lqr lzma pangocairo png tiff webp x xml zlib

and it finally worked - it no longer freezes and immediately produces the output I want.

rr-
  • 983