ImageMagick not using Inkscape in redhat

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
gob2019
Posts: 2
Joined: 2019-04-04T10:19:57-07:00
Authentication code: 1152

ImageMagick not using Inkscape in redhat

Post by gob2019 »

Hey everybody,

I've been using ImageMagick with Inkscape on macOS Mojave without issues to convert SVG images to PNG. I'm using ImageMagick 7.0.7-27 and Inkscape 0.92.2. When converting, the output clearly shows that 'inkscape' is being used:
convert -verbose test.svg final.png
'inkscape' '/var/folders/6y/qdfvrmd53wg3yrpf61lrvf_80000gp/T/magick-57985Oy427_7nyVWr' --export-png='/var/folders/6y/qdfvrmd53wg3yrpf61lrvf_80000gp/T/magick-57985gzb9AKrfjVs2' --export-dpi='96,96' --export-background='rgb(100%,100%,100%)' --export-background-opacity='1' > '/var/folders/6y/qdfvrmd53wg3yrpf61lrvf_80000gp/T/magick-57985aVfkcTYVeRJT' 2>&1
/var/folders/6y/qdfvrmd53wg3yrpf61lrvf_80000gp/T/magick-57985gzb9AKrfjVs2 PNG 122x31 122x31+0+0 8-bit sRGB 3184B 0.010u 0:00.000
test.svg=>/var/folders/6y/qdfvrmd53wg3yrpf61lrvf_80000gp/T/magick-57985gzb9AKrfjVs2 PNG 122x31 122x31+0+0 8-bit sRGB 3184B 0.000u 0:00.009
test.svg=>final.png PNG 122x31 122x31+0+0 8-bit sRGB 2202B 0.000u 0:00.000
I tried to do the same on a machine with redhat 6.10 and installed both ImageMagick and Inkscape with 'yum install'. Versions: ImageMagick 6.7.2-7 2017-01-12 Q16 and Inkscape 0.47 r22583 (Mar 4 2015). But regardless of what I do, rsvg is used and not inkspace. RSVG doesn't convert my image properly (artifacts, letters are inverted etc). Using rsvg directly yields the same outcome so I suspect it's the culprit here.

Output on redhat:
convert -verbose file.svg file.png
file.svg SVG 122x31 122x31+0+0 16-bit DirectClass 3.13KB 0.000u 0:00.000
file.svg=>file.png SVG 122x31 122x31+0+0 16-bit DirectClass 0.000u 0:00.010
What do I need to do to have inkscape be used in redhat?

Since ImageMagick says:

"ImageMagick utilizes inkscape if its in your execution path otherwise RSVG. If neither are available, ImageMagick reverts to its internal SVG renderer. The default resolution is 96 DPI. Use -size command line option to specify the maximum width and height"

I tried adding the path of inkscape to the PATH and added and entry in delegates.xml for inkscape (I have this on the Mac version) to no avail.

Help much appreciated. Thx.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: ImageMagick not using Inkscape in redhat

Post by snibgo »

gob2019 wrote:... redhat 6.10 and installed both ImageMagick and Inkscape with 'yum install'. Versions: ImageMagick 6.7.2-7
6.7.2-7 is a very old version. I suggest you try a more recent version.
snibgo's IM pages: im.snibgo.com
gob2019
Posts: 2
Joined: 2019-04-04T10:19:57-07:00
Authentication code: 1152

Re: ImageMagick not using Inkscape in redhat

Post by gob2019 »

snibgo wrote: 2019-04-04T12:01:59-07:00
gob2019 wrote:... redhat 6.10 and installed both ImageMagick and Inkscape with 'yum install'. Versions: ImageMagick 6.7.2-7
6.7.2-7 is a very old version. I suggest you try a more recent version.
How can I install a more recent version of ImageMagick and Inkscape? Those were the most recent versions that I got when using yum.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: ImageMagick not using Inkscape in redhat

Post by snibgo »

Sorry, I know nothing about Redhat installations. I should add that your Inkscape 0.47 is also very old.
snibgo's IM pages: im.snibgo.com
Post Reply