Export to SVG with trim via command line results in blank image
This issue was originally posted in support forum here.
When exporting musicxml file without trimming all notes, stave, signature are viewable. However, when setting trim to 0 the resulting SVG does not display anything. The SVG file has content but might not be within its own viewport.
The musicxml file (part.xml) is generated using the python package music21.
This happens on Windows and Linux.
I've attached the input file and two output files demonstrating the issue.
The first output file (part-1.svg) shows graphics and is generated like so:
musescore3 part.xml -o part.svg
And the second (part-trimmed-1.svg) without viewable graphics is generated using:
musescore3 part.xml -o part-trimmed.svg -T 0
I've also included a 3rd png image which shows trimming does work for non-svg format. This was generated using:
musescore3 part.xml -o part-trimmed.png -T 0
Here is the png inline:
Attachment | Size |
---|---|
part-trimmed-1.svg | 10.44 KB |
part.xml | 1.69 KB |
part-1.svg | 10.42 KB |
part-trimmed-1.png | 5.91 KB |
Comments
See https://github.com/musescore/MuseScore/pull/5970
Fixed in branch master, commit 4812418762
_fix #303902 - Remove unnessary translation.
The addtional translation moves the elements out of the viewport._
Fixed in branch master, commit ee1b1bb63c
_Merge pull request #5970 from bsdz/303902-svg_trim_blank
Fix #303902: Export to SVG with trim via command line results in blank image_
Automatically closed -- issue fixed for 2 weeks with no activity.