lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lots of temporary files when generating png files


From: David Wright
Subject: Re: Lots of temporary files when generating png files
Date: Tue, 4 Feb 2020 13:48:39 -0600
User-agent: Mutt/1.10.1 (2018-07-13)

On Tue 04 Feb 2020 at 16:59:36 (+0100), Anthony Rushforth wrote:
> @Aaron : Because if I use your command line I get this png : a full page
> 
> I want a cropped png, and I found the command line I use in the
> documentation (
> http://lilypond.org/doc/v2.19/Documentation/usage-big-page#lilypond-output-in-other-programs)
> :
> 
> > To produce ‘PNG’ images;
> >
> > lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts --png 
> > myfile.ly
> >
> >
> I don't understand why it has to be "eps", but it's the only way I found...
> do you have another option to get cropped images ?
> 
> @David : I'm writing a program that generates html files including images
> with lilypond scores.
> My first attempt was using "lilypond-book" but I need more control (I want
> to include midi file for example).
> I will delete the remaining EPS file from my program.

My workflow is different, partly because I also use it with LaTeX files
that are unrelated to LilyPond. I work in PDF files because they are
easy to manipulate and include in other files without degradation.
They easier to archive, too, because they're multi-page.

I crop PDF files with   pdfcrop --margins 1   which assures at least
a one pixel border to each page. If I need to produce PNGs, I use
convert (imagemagick) like this, but with an appropriate
resolution/size:
$ convert -density 400 /tmp/fivecrop.pdf -alpha opaque -resize 50% 
/tmp/fivecrop.png
Convert automatically bursts PDF files into individual pages/images
as necessary.

(One detail regarding my previous post: my LaTeX script only
"trashes" .aux files when they consist of precisely '\relax \n',
which is an "empty" file.)

Cheers,
David.

Attachment: five.pdf
Description: Adobe PDF document

Attachment: fivecrop.pdf
Description: Adobe PDF document

Attachment: fivecrop.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]