2

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.

  • 1
    Install Inkscape as your SVG renderer and see if you have the same issue. Also what do you get from `magick -list format` for the line for PNG. What version libpng does it say you are using. Note that in IM 7, better to use magick rather than convert. – fmw42 Nov 15 '22 at 21:10
  • The problem is not with writing a PNG. It is with reading the SVG - that's why it is a **decode** (i.e. read error) not an encode (i.e. write error). As Fred says, you need to install something that can read SVG files, maybe there is an `rsvg` package on SUSE - I don't use it myself. – Mark Setchell Nov 15 '22 at 22:25
  • 1
    `rsvg-convert` is already installed. I installed Inkscape and confirmed that I can open the SVG in Inkspace, then reinstalled IM again. The problem remains. `magick -list format` has no output. `libpng` is version `1.6.38`. – Scott Wyman Neagle Nov 16 '22 at 19:42
  • Try installing `pkg-config/pkgconfig` prior to installing **ImageMagick**. It certainly helps **ImageMagick** find PNG libraries on debian and ubuntu. – Mark Setchell Nov 16 '22 at 22:05
  • 1
    If magick -list format has no output, then you did not install correctly. Perhaps. you installed from source. If so, you will have no delegates installed, which you need for PNG, TIFF, JPG, SVG etc. Install from a binary package or install all your needed delegates manually first and be sure they install properly with no errors or needed delegates. Even if you install libpng and rsvp-convert, they have to be installed in such a way that or place that Imagemagick can find them. – fmw42 Nov 17 '22 at 03:46

1 Answers1

1

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.