0

I am trying to convert PNGs to GIF using ImageMagick on my Ubuntu server. I used a PHP code to generate it however when I ran it, I received..

PHP Fatal error: Uncaught exception 'ImagickException' with message 'no decode delegate for this image format

Fatal error: Uncaught exception 'ImagickException' with message 'no decode delegate for this image format

Then I used: convert -list configure, on the libs, I didn't see either gif or png. So I researched a bit more, and found that I should remove and re-install Imagick..

So I tried sudo apt-get remove imagemagick, and then..

sudo apt-get install libperl-dev gcc libjpeg-dev libbz2-dev libtiff4-dev libwmf-dev libz-dev libpng12-dev libx11-dev libxt-dev libxext-dev libxml2-dev libfreetype6-dev liblcms1-dev libexif-dev perl libjasper-dev libltdl3-dev graphviz pkg-config

After it completed installing, I used wget http://www.imagemagick.org/download/binaries/ImageMagick-x86_64-apple-darwin15.0.0.tar.gz and got the latest version.

But then, I got totally lost. I uncompressed it using tar -xzf ImageMagick-x86_64-apple-darwin15.0.0.tar.gz. I was expecting to find ./configure in here, but I couldn't.

What am I missing or doing wrong? Am I completely out of track?

Community
  • 1
  • 1
senty
  • 12,385
  • 28
  • 130
  • 260
  • i'm facing the same issue so i 'm moving the temporary uploaded file to another location and giving it it's original name and extension – Ghulam Abbas May 31 '19 at 23:23

1 Answers1

2

You downloaded iOS binaries instead of sources. You need sources if you want to compile them by hand:

http://www.imagemagick.org/download/ImageMagick-6.9.3-0.tar.gz

With this file you will be able to compile ImageMagick with whatever image formats you want.

http://www.imagemagick.org/script/install-source.php

Edit: Step-by-step instructions

wget http://www.imagemagick.org/download/ImageMagick-6.9.3-0.tar.gz
tar xvzf ImageMagick-6.9.3-0.tar.gz
cd ImageMagick-6.9.3-0
./configure

Make sure that the output of the previous command shows this:

PNG               --with-png=yes        yes

And then:

make
sudo make install
sudo ldconfig /usr/local/lib
Aleksander Wons
  • 3,611
  • 18
  • 29
  • I am not so good with terminal commands when I am ssh'd in the local machine. Can you please add the necessary commands to write in your answer? Because I have been trying different stuff but got quiet lost. Thanks a lot in advance! – senty Jan 06 '16 at 13:05
  • @senty I added more detailed instructions – Aleksander Wons Jan 06 '16 at 13:26
  • Thanks a lot! Just checked, it outputs `PNG --with-png=yes yes` when I use `./configure`. But still the same error `no decode delegate for this image format`. What am I doing wrong? Please note that I did everything as you showed. I think PNG is there, but GIF is not. What is the way of adding it? – senty Jan 06 '16 at 13:35
  • Update: I also ran `identify -list format`. I can see `PNG* rw- Portable Network Graphics (libpng 1.2.50)` *AND* `GIF* rw+ CompuServe graphics interchange format` but still receiving the same error, no decode delegate. What do you think can be the problem? – senty Jan 06 '16 at 13:41
  • Which bit do you need to see? The libs bit is `LIBS -ljbig -ltiff -lfreetype -ljpeg -lpng12 -lfontconfig -lfreetype -lwmflite -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lz -lm -lgomp`. Please let me know if you need to see any other bit because it's quiet long. Thnx – senty Jan 06 '16 at 13:54
  • @senty The 'delegates' part. – Aleksander Wons Jan 06 '16 at 14:00
  • 'delegates' : `DELEGATES bzlib mpeg fontconfig freetype jbig jng jpeg lzma png ps tiff wmf x xml zlib` – senty Jan 06 '16 at 14:00
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/99948/discussion-between-awons-and-senty). – Aleksander Wons Jan 06 '16 at 14:08