After various google searches I finally found out why my lilypond
PNG-files did not contain a transparent background:
A bug in GhostScript introduced in version 8.64
(http://bugs.ghostscript.com/show_bug.cgi?id=690508)
When GhostScript encounters a 'too large' bitmap it enters clist-mode
rather than page buffer mode, which causes the tranparency to be
replaced by solid white, loosing the transparency that lilypond put into
the original postscript file.
I managed to circumvent this by patching my local lilypond installation
(ps-to-png.scm) to always call gs with an additional argument
-dMaxBitmap=2147483647 (max integer, the largest possible value gs will
accept, which means it will process anything up to 2G using page buffer
mode).
Given posts in the past on transparency not working without any
solutions (apart from post-processing with other tools) I decided to
share this one with the user-list. I think that my patch should not get
into the default lilypond distribution, as it's a dirty trick to
circumvent misbehaviour of GhostScript, but if you would like to apply
this fix, just search for the line with
-dTextAlphaBits=4\
in usr/share/lilypond/current/scm/ps-to-png.scm and add a line after
that line containing
-dMaxBitmap=2147483647\
to overrule the default GhostScript MaxBitmap with the maximum possible
value
regards,
Hans Aikema
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user