>> Chris Crossen:
> > When I use GIMP to convert a pdf produced with Lilypond to a .png, I
> > get nice crisp verticals and horizontals, no anti-aliasing. And, the
> > note heads and other rounded parts are beautifully anti-aliased.

> David Kastrup:
> I don't think that GIMP does anything but call Ghostscript for the
rendering
> (though I might not me up-to-date with my knowledge).  So this would boil
> down to figuring out the options it uses.
> 

Thank you, David, for pointing me in the right direction. And thanks to
everyone who contributed to this thread for getting me this far along.

The trick to getting the crisp horizontal and vertical lines while still
getting anti-aliased curves is the ghostscript option -dGraphicsAlphaBits.
When Lilypond produces a .png file it set this to 4. If you set it to 1
instead, you get horizontal and vertical lines that aren't anti-aliased.

I have attached two images showing the difference. crisp.png was produced
with -dGraphicsAlphaBits=1 and blurry.png was produced with
-dGraphicsAlphaBits=4.

My current workflow uses Lilypond to produce a .pdf. Then I convert the .pdf
to .png with GIMP. I'm going to change this so that Lilypond produces a .ps
file that I convert to .png with ghostscript. I won't save any steps, but I
believe it will be faster and less error-prone.

Chris Crossen

<<attachment: crisp.png>>

<<attachment: blurry.png>>

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to