]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/lilypond-book.py
release commit
[lilypond.git] / scripts / lilypond-book.py
index 9764e880853bd399a3fd11049e4fa56cb7f80fe0..5aa91fc0aecdd3c38b5233b545cbd0430eeb0408 100644 (file)
@@ -1135,6 +1135,8 @@ def get_bbox (filename):
 
 def make_pixmap (name):
        bbox = get_bbox (name + '.eps')
+
+
        margin = 0
        fo = open (name + '.trans.eps' , 'w')
        fo.write ('%d %d translate\n' % (-bbox[0]+margin, -bbox[1]+margin))
@@ -1144,6 +1146,10 @@ def make_pixmap (name):
 
        x = (2* margin + bbox[2] - bbox[0]) * res / 72.
        y = (2* margin + bbox[3] - bbox[1]) * res / 72.
+       if x == 0:
+               x = 1
+       if y == 0:
+               y = 1
 
        cmd = r'''gs -g%dx%d -sDEVICE=pnggray  -dTextAlphaBits=4 -dGraphicsAlphaBits=4  -q -sOutputFile=%s -r%d -dNOPAUSE %s %s -c quit '''
 
@@ -1284,7 +1290,6 @@ def option_help_str (o):
                arg = arg + o[0]
        return '  ' + sh + sep + long + arg
 
-
 def options_help_str (opts):
        "Convert a list of options into a neatly formatted string"
        w = 0
@@ -1312,7 +1317,6 @@ Options:
 Warning: All output is written in the CURRENT directory.
 
 
-
 Report bugs to bug-lilypond@gnu.org.
 
 Written by Tom Cato Amundsen <tca@gnu.org> and