Why does ImageMagick fail with "no decode delegate for this image format `PNG'" even when the png delegate is installed? - imagemagick

I'm working on openSUSE Tumbleweed.
I have ImageMagick installed.
$ convert --version
Version: ImageMagick 7.1.0-52 Q16-HDRI x86_64 20549 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(4.5)
Delegates (built-in): bzlib djvu fontconfig freetype gslib jng jpeg lcms ltdl lzma png ps raw tiff x xml zlib
Compiler: gcc (12.2)
Notice that the PNG delegate is installed, at least according to --version.
Despite this, converting fails.
$ convert covalent_platform.svg covalent_platform.png
convert: no decode delegate for this image format `PNG' # error/constitute.c/ReadImage/776.
convert: no images defined `covalent_platform.png' # error/convert.c/ConvertImageCommand/3342.
Even identifying a non-PNG file fails, with the same PNG delegate problem.
$ identify covalent_platform.svg
identify: no decode delegate for this image format `PNG' # error/constitute.c/ReadImage/776.
Any ideas for what might be wrong here?
I reinstalled libpng-devel and reinstalled IM, but the problem remains.

I figured out the problem, thanks to #fmw42 pointing out that if magick -list format has no output then the installation is bad.
I had installed IM from https://imagemagick.org/script/download.php
These downloads are not compatible with openSUSE.
After uninstalling and reinstalling IM from https://software.opensuse.org/package/ImageMagick, everything works as expected.

Related

imagemagick wmf support on Alpine Linux

I am installing imagemagick on Alpine, which picks up 7.0.10 version of imagemagick.
My primary use is to covert WMF to PNG.
But convert sample.wmf sample.png gives error
convert: no decode delegate for this image format `WMF' # error/constitute.c/ReadImage/572.
convert: no images defined `sample.png' # error/convert.c/ConvertImageCommand/3322.
As per https://www.imagemagick.org/script/formats.php, I also installed libwmf, which does not resolve the issue.
identify -list format | grep WMF does not return any result.
Updated Answer
You are in luck! GraphicsMagick can do it on alpine:latest:
apk add graphicsmagick
gm identify -version
GraphicsMagick 1.3.36 20201226 Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2020 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
Native Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) yes
BZIP no
DPS no
FlashPix no
FreeType yes
Ghostscript (Library) no
JBIG no
JPEG-2000 no
JPEG yes
Little CMS no
Loadable Modules yes
Solaris mtmalloc no
Google perftools tcmalloc no
OpenMP no
PNG yes
TIFF yes
TRIO no
Solaris umem no
WebP yes
WMF yes <--- HERE IT IS
X11 no
XML yes
ZLIB yes
Now do the conversion from WMF to PNG:
gm convert sample.wmf result.png
Original Answer
I don't think you'll be able to do that, with ImageMagick at least...
I tried installing libwmf on alpine:latest and then installing ImageMagick from source and it declined to use libwmf v0.2.12
So I checked what ImageMagick requires and it wants libwmf v0.2.8.2.
So I tried alpine:3.8 which can install libwmf v0.2.8.4 but ImageMagick still wouldn't accept that (xxx/ipa.h is missing).
So I looked back to alpine:3.3 and alpine:3.4 and they have no libwmf.
So I tried alpine:3.5 and that was the same libwmf version as alpine:3.8
TLDR; alpine:3.5's libwmf is too new for ImageMagick and alpine:3.4 doesn't have libwmf at all.
Note: I found the packages and versions of libwmf on this website.

ImageMagick isn't displaying arabic characters correctly

So I am trying to display an Arabic word using ImageMagick.
This is my code:
convert -size 1144x800 -background transparent -font "arabic_reg.ttf" -encoding Unicode label:#arabic.utf8 "oops.png"
#arabic.utf8 is saved in utf-8 and arabic_reg.ttf is an arabic font.
This is the result
letters are detached and inverted
adding -direction right-to-left doesn't seem to help also.
I am running ImageMagick 6.9.6-2 on mac.
Version: ImageMagick 6.9.6-2 Q16 x86_64 2016-10-20
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
Features: Cipher DPC Modules
Delegates (built-in): bzlib djvu fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms ltdl lzma openexr png ps tiff webp x xml zlib
Any idea how to fix this?
Thanks
Ran into the same problem, you gotta use pango and install the fonts in your system :)

Imagemagick 6.9.1-7 won't convert psd to any format (Yosemite)

When I run this:
/usr/local/bin/convert ~/desktop/myImage.psd ~/desktop/myImage.jpg
I get this error:
convert: no images defined `/Users/User/desktop/myImage.jpg' # error/convert.c/ConvertImageCommand/3230.
Here's my convert -version:
Version: ImageMagick 6.9.1-7 Q16 x86_64 2015-07-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib
I've tried at least 4 different psd files
I am one on the developers of ImageMagick and this version contains a bug in the PSD reader. We are aware of this bug and it will be fixed in 6.9.1-8.
Upgrade to 6.9.1-8 to address the issue.

imagemagick -- convert: no decode delegate for this image format `TIFF'

I'm trying to convert an image "img.tif" to "img.jpg" with the following command:
convert img.tif img.jpg
And this error arises:
convert: no decode delegate for this image format `TIFF' # error/constitute.c/ReadImage/501.
I've trawled the web for answers, but nothing is working.
The suggestions from previous people with this problem have been:
brew reinstall imagemagick --with-libtiff
, which I have done, to no avail. The call:
convert -list configure
still gives the following for DELEGATES:
DELEGATES bzlib mpeg png x xml zlib
ANY other suggestions would be appreciated.
Even another way to convert from .tif to .jpg from the command line.
I know it's not exactely the right solution of your problem but it can "do the job".
You could convert from tif to jpg by adding a PNG (which is lossless) converting step:
tif→PNG→jpg
inkscape --export-png=img.png img.tif
then
convert img.png img.jpg
For me, the command
convert -list configure | grep DELEGATES
returns:
DELEGATES bzlib djvu fftw fontconfig freetype jbig jpeg jng jp2 lcms2 lqr lzma openexr pango png rsvg tiff x11 xml wmf zlib
And I didn't do something special during install so I don't understand why you don't have the "tif" nor the "jpeg" part…
Maybe you can try to install "libtiff-tools" "libjpeg" and "libjpeg-turbo".
The delegates could be found here:
Imagemagic Delegates

convert: Wrong JPEG library version: library is 80, caller expects 90 `image.jpg'

I am using Ubuntu 13.04.
I am installing imagemagick. and It is installed properly via source.I find all required delegates.
convert -list configure | grep DELEGATES
I get :
DELEGATES bzlib djvu fontconfig freetype jbig jng jp2 jpeg lcms lqr lzma openexr png ps tiff x xml zlib
Now, Same code was working in OS Ubuntu 12.10 before.
Please guide how to solve issue
convert: Wrong JPEG library version: library is 80, caller expects 90image.jpg' `

Resources