Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImageMagick won't compile with PNG Support on Ubuntu

I hope I'm missing something stupid simple.

I'm trying to compile ImageMagick from source on Ubuntu 15.10. It compiles and runs just fine, but support for PNGs is missing. Both libpng and libpng-dev are installed but ImageMagick is having none of it:

./configure --with-quantum-depth=8 --enable-hdri --with-bzlib=yes --with-jpeg=yes --with-png=yes --with-tiff=yes
...
checking for PNG... no
....
PNG               --with-png=yes              no
....
Options used to compile and link:
PREFIX          = /usr/local
EXEC-PREFIX     = /usr/local
VERSION         = 6.9.3
CC              = gcc
CFLAGS          =  -fopenmp -g -O2 -Wall -mtune=haswell -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=8
CPPFLAGS        =   -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=8
PCFLAGS         = 
DEFS            = -DHAVE_CONFIG_H
LDFLAGS         = 
LIBS            = 
CXX             = g++
CXXFLAGS        = -g -O2 -pthread
FEATURES        = DPC HDRI Cipher OpenMP
DELEGATES       = bzlib mpeg jbig jpeg ps tiff

Thank you for any help you can provide!

like image 417
Osmium USA Avatar asked Jan 25 '16 17:01

Osmium USA


People also ask

How to fix ImageMagick not compiled on Ubuntu 18 04?

I had the same problem under Ubuntu 18.04 when trying to compile the latest version of ImageMagick 7.0.8. The solution was to manually compile and install the latest version of libheif from here. After this, the compilation succeeded. Remember to uninstall the default package of libheif supplied by Ubuntu first, both libheif and libheif-dev.

How to install ImageMagick on Windows 10?

First of all, update your system’s APT cache repository by typing the command given below: After updating your system’s package repository, install ImageMagick using the command given below: Type “y” and click “Enter” to grant additional disk space and continue the installation process of ImageMagick.

Can ImageMagick convert bitmap Pix?

Use ImageMagick to create, edit, compose or convert bitmap pix. It could actually read and write snapshots in a type of codecs (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG.


Video Answer


2 Answers

I don't know what the problem was but I know how to fix it.

sudo apt-get build-dep imagemagick

Now I'm sure that I'm not missing any dependencies and PNG support was automatic.

like image 103
Osmium USA Avatar answered Nov 13 '22 08:11

Osmium USA


Try to add png in the list of DELEGATES.

Try to add "--with-png"

Try adding "--with-modules"

like image 34
asalic Avatar answered Nov 13 '22 08:11

asalic