ImageMagick fails to correctly interpret SVG path!

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
cookie
Posts: 7
Joined: 2014-08-25T07:15:07-07:00
Authentication code: 6789

ImageMagick fails to correctly interpret SVG path!

Post by cookie »

For some reason the SVG path stored in the JPG file is misinterpreted.

I'm using:

Code: Select all

identify -format "%[8BIM:1999,2998:#1]" some_file_that_used_to_work.jpg
to compare the output with the one that used to work and it is different. The clipping path it represent is totally distorted.

This looks like regression bug introduced accidentally in one of the updates to the system, however I'm not sure when it happened. Running CentOS doesn't help as we are behind the official newest version, and using REMI repository. Currently used version (with the bug):

Code: Select all

Version: ImageMagick 6.8.9-0 Q16 x86_64 2014-04-14 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype gslib jng jpeg lcms ltdl openexr pangocairo png ps rsvg tiff webp wmf x xml zlib
Installing RPM from IM website doesn't work. I tried building it from RPMS, and although installed if with no problems the system still sees the old one...

I wonder though if it is the IM itself or one of its delegates to blame (rsvg?)

Please help!
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: ImageMagick fails to correctly interpret SVG path!

Post by dlemstra »

Can you post a link to your image? And an image of the clipmask you are expecting?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
cookie
Posts: 7
Joined: 2014-08-25T07:15:07-07:00
Authentication code: 6789

Re: ImageMagick fails to correctly interpret SVG path!

Post by cookie »

User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: ImageMagick fails to correctly interpret SVG path!

Post by dlemstra »

Can you upgrade to the latest version? I am getting the correct output with that version.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
cookie
Posts: 7
Joined: 2014-08-25T07:15:07-07:00
Authentication code: 6789

Re: ImageMagick fails to correctly interpret SVG path!

Post by cookie »

Hey!

That is exactly what I'm trying to do but it wasn't obvious to me what is responsible for SVG processing in IM and if can be updated separately to core application (rsvg?). Additionally I'm relying on custom repository which was slightly out of date. It seems as if the newest version which was added last night on my request works as expected, although the result of processing the same file is yet again different (SVG data itself) the overall result looks good.

Thanks for help.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick fails to correctly interpret SVG path!

Post by fmw42 »

You may get different results depending upon what delegate library is being used (and perhaps version of the library). You can use Inkscape, RSVG or IM internal. I would suggest one of the first two and the most current versions of them.
cookie
Posts: 7
Joined: 2014-08-25T07:15:07-07:00
Authentication code: 6789

Re: ImageMagick fails to correctly interpret SVG path!

Post by cookie »

Thanks. I updated to latest version and it's a nightmare. Every single conversion takes ages.
I will need to downgrade somehow if that's possible.
Can I switch the delegate to something of my choice?
cookie
Posts: 7
Joined: 2014-08-25T07:15:07-07:00
Authentication code: 6789

Re: ImageMagick fails to correctly interpret SVG path!

Post by cookie »

Just reporting here for posterity:
Current version:
Version: ImageMagick 6.8.9-7 Q16 x86_64 2014-08-25 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype gslib jng jpeg lcms ltdl openexr pangocairo png ps rsvg tiff webp wmf x xml zlib

Clipping path error disappeared but convert started to choke. Eliminating possible offenders left us with

Code: Select all

+profile "*"
to blame.
Now - that worked flawlessly so far for years and suddenly stopped. We replaced it with

Code: Select all

-strip
which eliminated the problem.

In the meantime I tried playing with OpenMP and multi-core support, threads, memory limits and such because the OS was killing the convert process due to RAM usage. All that disappeared with the command change I mentioned above.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick fails to correctly interpret SVG path!

Post by fmw42 »

the +profile "*" issue is fixed in IM 6.8.9.8 Q16 beta. see viewtopic.php?f=3&t=26120&p=114484&hili ... le#p114484
Post Reply