|
From: | Jonathan Kulp |
Subject: | Re: setting --png in an .ly file (without using command line)? |
Date: | Sat, 27 Sep 2008 16:26:03 -0500 |
User-agent: | Thunderbird 2.0.0.17 (X11/20080925) |
lily2image -q filename.lyThe -q flag (quiet mode) makes it default to png format at 150 DPI resolution. You can specify different formats (gif, jpeg, tiff, pcx, bmp, and many others) and resolutions (pretty much any res you want) with -f and -r flags, and you can even make it have a transparent background. It relies on the "netpbm" package of image tools, which you can get from Linux repositories, or from MacPorts if you're a Mac user. This script runs equally well on Linux or Mac OSX.
I'll attach the script and the html version of the manpage. Jon Mark Polesky wrote:
When I want .png output, I usually type something like this in the command line: lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts --png my_file.ly Is it possible to do all of this from inside the .ly file? Using the ly:set-option command, I can do most of it: #(ly:set-option 'backend 'eps) #(ly:set-option 'gs-load-fonts #f) #(ly:set-option 'include-eps-fonts #t) But I can't figure out how to set --png from within the file. Can I? Thanks, Mark_______________________________________________ lilypond-user mailing list address@hidden http://lists.gnu.org/mailman/listinfo/lilypond-user
-- Jonathan Kulp http://www.jonathankulp.com
lily2image
Description: Text document
lily2image - Convert lilypond source files into cropped musical examples in a variety of image formats.
lily2image [option] [option] <filename.ly>
This program is designed to use Lilypond source files to create musical examples suitable for insertion in documents and web pages. It requires the netpbm package of image-manipulation tools and supports a large variety of image formats. Without options, it gathers user preferences interactively to set the following parameters: resolution, background transparency, and desired output format.
Since no options are set, this example will run the program in interactive mode:
lily2image filename.ly
You may specify options at the command line. The following example creates a gif image with transparent background at a resolution of 300 dpi:
lily2image -r=300 -f=gif -t filename.ly
The next example converts to png. Since resolution is not set, user will be prompted to enter resolution value:
lily2image -f=png filename.ly
In this example, the resolution is still not set, but user will NOT be prompted to enter resolution value because quiet mode is specified. Resolution will be the default 150 DPI:
lily2image -f=png -q filename.ly
The last example will produce a gif image at 250 DPI with transparent background. It will run in quiet mode (suppressing all echo messages) but will display image in Evince viewer when finished since the -p option is set and Evince is selected:
lily2image -f=gif -r=250 -t -q -p -V=evince filename.ly
In quiet mode, program exits with various return codes.
Jonathan Kulp, Patrick Horgan.
netpbm, lilypond.
[Prev in Thread] | Current Thread | [Next in Thread] |