Page 1 of 1

convert: no encode delegate for this image format `XC' @ error/constitute.c/WriteImage/1217.

Posted: 2018-11-27T07:28:01-07:00
by BigNoub
I'm using ImageMagick 7.0.8-14 on Ubuntu 16.04. I installed by downloading the tar.gz and ran

Code: Select all

./configure --prefix /usr/local && \
make install
When I try a simple command with png or jpg as an output format:

Code: Select all

convert -size 800x800 xc:white white.jpg
I get the error message

Code: Select all

convert: no encode delegate for this image format `XC' @ error/constitute.c/WriteImage/1217.
No problem when I run it with .gif as output format though.

I've seen a couple of related threads but couldn't find clear explanations on what to do, so here I am. Any idea what I should do?

Re: convert: no encode delegate for this image format `XC' @ error/constitute.c/WriteImage/1217.

Posted: 2018-11-27T07:55:20-07:00
by snibgo
For IM v7, I suggest you use "magick", not "convert" or "magick convert".
no encode delegate for this image format
This means IM couldn't find a delegate to encode (ie write) the format you want, in this case PNG or JPEG.

So I suspect you didn't build IM with those delegates, eg libpng.

What does "magick version" say? It should be something like:

Code: Select all

Version: ImageMagick 7.0.7-28 Q16 x64 2018-03-25 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr openexr pangocairo png ps raw rsvg tiff webp xml zlib
If "Delegates (built-in)" doesn't include png and jpeg, then that's the problem. The solution is to build those libraries first, then rebuild IM.

Re: convert: no encode delegate for this image format `XC' @ error/constitute.c/WriteImage/1217.

Posted: 2018-11-27T08:13:28-07:00
by BigNoub
magick -version only says:

Delegates (built-in): zlib

so that's indeed the problem. How do I build these libraries exactly? What is the command?

Re: convert: no encode delegate for this image format `XC' @ error/constitute.c/WriteImage/1217.

Posted: 2018-11-27T08:33:02-07:00
by snibgo
Your config.log will say what libraries the build process was expecting. I don't know how to download and build those in Ubuntu, but I expect the process is similar to downloading and building IM.