I'm trying to use Emacs to visualise very large UML diagrams created by PlantUML [1]. In PNG form these diagrams have over 20000x1300 - in fact, the reason why I moved from PNG to SVG for their generation is that I could not find the right value for PLANTUML_LIMIT_SIZE
. At any rate, they generate correctly in SVG and also open correctly using Google Chrome (see [2] for an example diagram from my git repo). However, when I try to visualise them in Emacs, after a long time, I get a 30x30 size and a blank square.
So my question is: are there any settings I need to toggle in order to display very large SVG files using image-mode, or did I perhaps hit some kind of limitation?
Update 1: Please note that I can display regular (small) SVG images correctly, including smaller PlantUML diagrams.
Update 2: I'm using Emacs 27.1 on Debian GNU/Linux testing.
Update 3: I have read through the code of image-mode
[3] and I cannot see any obvious conditional handling for SVG based on size. However, I am not an elisp expert so I probably missed something.
Update 4: I ran emacs with -q
to figure out if this was a problem of my config, and it supplied me with a much more informative message:
Invalid image size (see ‘max-image-size’)
I then subsequently set this variable to some very large values:
(setq max-image-size 162704)
However, this only changed the error:
Error parsing SVG image ‘(image :type svg :file PATH_TO_IMAGE/dogen.text.svg :scale 1 :max-width 643 :max-height 324)’
[3] https://github.com/emacs-mirror/emacs/blob/master/lisp/image.el