LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   SVG overwritten by "identify" (https://www.linuxquestions.org/questions/slackware-14/svg-overwritten-by-identify-4175735985/)

pc2005 04-13-2024 01:57 PM

SVG overwritten by "identify"
 
As in topic. When I try to open .svg file (valid or invalid) by:

Code:

identify <filename.svg>
or:

Code:

display <filename.svg>
entire file will be overwritten by error message:

Code:

/tmp/magick-W0ZTRRwTcj6czhomV-9zgZpQS5yVuXfb:1: parser error : Document is empty

^

** (org.inkscape.Inkscape:669): WARNING **: 20:46:12.346: Could not detect file format. Tried to open it as an SVG anyway but this also failed.
/tmp/magick-W0ZTRRwTcj6czhomV-9zgZpQS5yVuXfb:1: parser error : Start tag expected, '<' not found
/tmp/magick-W0ZTRRwTcj6czhomV-9zgZpQS5yVuXfb:1: parser error : Document is empty
^
ink_file_open: '/tmp/magick-W0ZTRRwTcj6czhomV-9zgZpQS5yVuXfb' cannot be opened!
InkscapeApplication::document_open: Failed to open: /tmp/magick-W0ZTRRwTcj6czhomV-9zgZpQS5yVuXfb
ConcreteInkscapeApplication::on_open: failed to create document!

Distribution slackware64-current with alienbob repos.

BTW "identify" is also used by F3 view in midnight commander.

Can somebody confirm it is not just my machine configuration?

cwizardone 04-13-2024 05:44 PM

Quote:

Sat Apr 13 19:45:25 UTC 2024
l/imagemagick-7.1.1_29-x86_64-1.txz: Upgraded.
Revert to the previous ImageMagick because the latest one is destroying SVG
files if "identify" or "display" is used on them.
Thanks to pc2005.
http://slackware.oregonstate.edu/sla.../ChangeLog.txt

Markus Wiesner 04-13-2024 06:30 PM

Quote:

Originally Posted by pc2005 (Post 6495735)
Can somebody confirm it is not just my machine configuration?


I can reproduce the problem only with imagemagick-7.1.1_29-x86_64-1. Did you update /etc/ImageMagick-7/delegates.xml after installing imagemagick-7.1.1_30-x86_64-1?

Code:

--- imagemagick-7.1.1_29-x86_64-1/etc/ImageMagick-7/delegates.xml.new  2024-02-26 20:03:29.000000000 +0100
+++ imagemagick-7.1.1_30-x86_64-1/etc/ImageMagick-7/delegates.xml.new  2024-04-08 20:11:03.000000000 +0200
@@ -109,7 +109,7 @@
  <delegate decode="sid" command="&quot;mrsidgeodecode&quot; -if sid -i &quot;%i&quot; -of tif -o &quot;%o&quot; &gt; &quot;%u&quot;"/>
  <delegate decode="svg" command="&quot;rsvg-convert&quot; -o &quot;%o&quot; &quot;%i&quot;"/>
  <!-- Change export-filename to export-png for inkscape < 1.0 -->
-  <delegate decode="svg:decode" stealth="True" command="&quot;inkscape&quot; &quot;%s&quot; --export-filename=&quot;%s&quot; --export-dpi=&quot;%s&quot; --export-background=&quot;%s&quot; --export-background-opacity=&quot;%s&quot; &gt; &quot;%s&quot; 2&gt;&amp;1"/>
+  <delegate decode="svg:decode" stealth="True" command="&quot;inkscape&quot; &quot;%s&quot; &quot;--export-filename=%s&quot; &quot;--export-dpi=%s&quot; &quot;--export-background=%s&quot; &quot;--export-background-opacity=%s&quot;"/>
  <delegate decode="tiff" encode="text" command="&quot;tesseract&quot; &quot;%i&quot; &quot;%u&quot;; /usr/bin/mv &quot;%u.txt&quot; &quot;%o&quot;"/>
  <delegate decode="tiff" encode="launch" mode="encode" command="&quot;gimp&quot; &quot;%i&quot;"/>
  <delegate decode="wdp" command="/usr/bin/mv &quot;%i&quot; &quot;%i.jxr&quot;; &quot;JxrDecApp&quot; -i &quot;%i.jxr&quot; -o &quot;%o.tiff&quot;; /usr/bin/mv &quot;%i.jxr&quot; &quot;%i&quot;; /usr/bin/mv &quot;%o.tiff&quot; &quot;%o&quot;"/>


pc2005 04-14-2024 03:12 AM

Quote:

Originally Posted by Markus Wiesner (Post 6495763)
I can reproduce the problem only with imagemagick-7.1.1_29-x86_64-1. Did you update /etc/ImageMagick-7/delegates.xml after installing imagemagick-7.1.1_30-x86_64-1?

Thanks, that seems to help.

It was a configuration problem after all. I must have missed the configuration changed notice even when I specifically reinstalled the imagemagick yesterday :-/.

So the imagemagick-7.1.1_30 is fine, but delegates.xml _must_ be updated or it destroys svg.


All times are GMT -5. The time now is 09:10 AM.