New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
identify: non-conforming drawing primitive definition `path' @ error/draw.c/DrawImage/3284. #974
Comments
The internal ImageMagick SVG renderer is not fully compliant with the specification. Instead we recommend you build ImageMagick with an alternative renderer, libRSVG, or inkscape. |
Recent releases of ImageMagick does not return the exception you experienced. |
Still getting this on MacOS while running ImageMagick 7.0.8-8 Q16 x86_64 2018-07-23:
|
|
Can you post a link to ActiveStorage20191208-40819-tp8w08.svg? We need to download it and reproduce the problem before we can offer a solution. If it contains sensitive data, you could always obfuscate the data before you post it. |
Sure: I zipped it since Github doesn't support svg uploads. For now work-around is to rebuild imagemagick with rsvg, but it's a pain after Homebrew decided to ditch options support for some reason. |
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ within a day or two. |
Thank you @urban-warrior |
Still able to reproduce with
|
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow. |
Works fine for me on IM 7.0.9.27 Q16 Mac OSX, if you use proper IM 7 syntax. Use magick, not convert. Read the SVG before the -resize.
|
The problem is related to the ImageMagick internal SVG renderer. Our recent patch resolved the issue. |
2020-03-15 7.0.10-1 Cristy <quetzlzacatenango@image...> * Release ImageMagick version 7.0.10-1, GIT revision 17065:130e52e:20200315. 2020-03-14 7.0.10-1 Cristy <quetzlzacatenango@image...> * Add support for returning the convex hull of an image with the %[canvas-hull] property. 2020-03-09 7.0.10-1 Dirk Lemstra <dirk@lem.....org> * Added option to specify the preferred version when writing a PDF file with -define pdf:version=version (e.g. 1.7). 2020-03-07 7.0.10-1 Cristy <quetzlzacatenango@image...> * Do not throw exception on empty draw path (reference ImageMagick/ImageMagick#974). * Fix possible buffer overflow in ComplexImages(). * SVG to MVG requires transforms to appear before clipping paths (reference ImageMagick/ImageMagick#1860).
https://build.opensuse.org/request/show/786802 by user pgajdos + dimstar_suse - version update to 7.0.10.1 * Add support for returning the convex hull of an image with the %[canvas-hull] property. * Added option to specify the preferred version when writing a PDF file with -define pdf:version=version (e.g. 1.7). * Do not throw exception on empty draw path (reference ImageMagick/ImageMagick#974). * Fix possible buffer overflow in ComplexImages(). * SVG to MVG requires transforms to appear before clipping paths (reference ImageMagick/ImageMagick#1860).
I have the same issue on
|
Your syntax is not correct. Imagemagick 7 is not forgiving like Imagemagick 6. For Imagemagick 7, use magick, not convert. Place all operators (like -flatten) after reading the input. If the input is SVG or PDF, you should put -density or -colorspace before reading the input. Otherwise place all other settings or operators after reading the input. So perhaps you want:
It is generally not a good idea to use -geometry for resizing. |
@fmw42 thanks for the fast reply. I still get the same error with your suggested command:
even the same with identify
|
You may have some feature in your SVG file that your SVG renderer cannot handle. What do you get from magick -list format for the end of the line for SVG. Does it say XML or RSVG? If the latter what is the version of RSVG. Do you have Inkscape on your system? Run the following:
what is returned? Can you post your SVG file? |
@fmw42
Here's the svg file (zipped): |
Your file converts fine for me on IM 7.0.10.7 Q16 Mac OSX with Inkscape 0.92.4. Perhaps your Inkscape is old or buggy? Check if there is a more current version. Note for Imagemagick 7, use magick not convert
Does that work? |
Sorry I didn't have Inkscape installed before, now I installed
Can there be any other requirements I'm missing? The main thing I want to do is to convert and merge the background image and the svg together. Here's an example file of the two: |
You did have inkscape already. You installed a version 1.0 under development. The conversion of your SVG file works fine for me using IM 7.0.10.7 Q16 with Inkscape 0.92.4.
works fine for me. Does it not work for you? If I use the Internal Imagemagick SVG renderer, I get
magick: non-conforming drawing primitive definition `stroke-linecap' @ error/draw.c/RenderMVGContent/4434. So I suspect you have not installed Inkscape in a way that Imagemagick can find it. Put the path to Inkscape in your $PATH environment variable and try again with the first command above. P.S. When I convert your SVG file to PNG, it does not have a transparent background. So when overlaid on your jpg, the box on the JPG will be covered over. |
Description
Running identify on the following svg (see below) will return identify: non-conforming drawing primitive definition `path' @ error/draw.c/DrawImage/3284.
Steps to Reproduce
This svg:
Run this:
End of Output:
System Configuration
The text was updated successfully, but these errors were encountered: