Re: Png cropping

2017-02-25 Thread Renato Fiorenza
Hi, Thank you for your replies. Using a GUI like Frescobaldi is not really something I can do while programming. However, I can surely insert margins to the cropped png, which is definitely what I am going to do. Best regards, Renato ___ lilypond-user

Re: Png cropping

2017-02-25 Thread Renato Fiorenza
Hi Simon, hi David, I am very sorry. I absolutely did not intend to make any sort of accusation. I did word the phrase badly, led by the too impulsive thought that I couldn't believe that LilyPond, even being so powerful, couldn't do what I thought it would be certainly able to do. Actually, a

Re: Png cropping

2017-02-25 Thread David Wright
On Sat 25 Feb 2017 at 04:01:43 (-0700), renyhp wrote: > Hi, > Thank you for your answers. I am actually programming something automated (a > Telegram bot for LilyPond! If you are on Telegram you will find it at > @lilypondbot), so probably the best option will be to discard using > LilyPond's cropp

Re: Png cropping

2017-02-25 Thread karl
> renyhp wrote > > I read in the documentation that it is possible to create a cropped png by > > using "-dbackend=eps -dresolution=600 —png" and inserting this \paper > > block: > > > > However, I think the cropping is too heavy. How can I produce a png with > > some nonzero margins? Have you t

Re: Png cropping

2017-02-25 Thread David Wright
On Sat 25 Feb 2017 at 02:26:53 (-0700), Klaus Blum wrote: > Hi Renato, hi Andrew, > > Andrew Bernard wrote > > why would you use backend = eps if you are generating a PNG file? I think > > you can omit that. > > The auto-cropping features only work with the EPS backend which can also be > used to

Re: Png cropping

2017-02-25 Thread SoundsFromSound
inners) --> http://bit.ly/bcl-lilypond -- View this message in context: http://lilypond.1069038.n5.nabble.com/Png-cropping-tp200437p200451.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.o

Re: Png cropping

2017-02-25 Thread Simon Albrecht
reate solutions for what use cases they saw coming. IIUC, the PNG cropping has been designed for use with lilypond-book, at any rate the developers didn’t see any need for adjusting the margins. If you want to change it, you are very welcome to propose patches, or file a concise enhancement request

Re: Png cropping

2017-02-25 Thread renyhp
f. It is a bit sad, though, that a so powerful tool like LilyPond can't adjust some simple things like png output margins. Best regards, Renato -- View this message in context: http://lilypond.1069038.n5.nabble.com/Png-cropping-tp200437p200445.html Sent from the User mailing list

Re: Png cropping

2017-02-25 Thread Klaus Blum
;X" but I don't think this will result in a usable workflow. Maybe it's easier to add margins with an image editor that has automatic batch processing like IrfanView. Cheers, Klaus -- View this message in context: http://lilypond.1069038.n5.nabble.com/Png-cropping-tp200437p

Re: Png cropping

2017-02-24 Thread Andrew Bernard
HI Renato, As an aside, why would you use backend = eps if you are generating a PNG file? I think you can omit that. Andrew ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user

Png cropping

2017-02-24 Thread Renato Fiorenza
I read in the documentation that it is possible to create a cropped png by using "-dbackend=eps -dresolution=600 —png" and inserting this \paper block: \paper{ indent=0\mm line-width=120\mm oddHeaderMarkup = ##f evenHeaderMarkup = ##f oddFooterMarkup = ##f evenFooterMarkup

Re: png cropping

2008-10-03 Thread Jonathan Kulp
Yes, that would probably do it. I'll see if I can sort any of it out tonight after the kids are in bed. Thanks for the suggestion, as always, Patrick. :) Jon Patrick Horgan wrote: Jonathan Kulp wrote: I've actually tried to do this. I booted into the Windows partition of my machine and in

Re: png cropping

2008-10-03 Thread Patrick Horgan
Francisco Vila wrote: 2008/10/3 Jonathan Kulp <[EMAIL PROTECTED]>: Patrick, you mentioned at some point along the way that it would have been better if I had started the whole thing in Python instead of bash. Would this also have made it easier to port to Windows? It wouldn't make it an

Re: png cropping

2008-10-03 Thread Patrick Horgan
Jonathan Kulp wrote: I've actually tried to do this. I booted into the Windows partition of my machine and installed Cygwin and the netpbm package, but I had trouble finding the netpbm stuff from the Cygwin bash shell. The shell seemed very isolated from the rest of the machine, as I couldn't

Re: png cropping

2008-10-03 Thread Francisco Vila
2008/10/3 Jonathan Kulp <[EMAIL PROTECTED]>: > Patrick, you mentioned at some point along the way that it would have been > better if I had started the whole thing in Python instead of bash. Would > this also have made it easier to port to Windows? IMO yes, as for the script itself, and no, as fo

Re: png cropping

2008-10-02 Thread Jonathan Kulp
I've actually tried to do this. I booted into the Windows partition of my machine and installed Cygwin and the netpbm package, but I had trouble finding the netpbm stuff from the Cygwin bash shell. The shell seemed very isolated from the rest of the machine, as I couldn't access any of the do

Re: png cropping

2008-10-02 Thread Patrick Horgan
Tomas Valusek wrote: Jonathan Kulp napsal(a): After much revision, addition, and general fussing about with it, I'm happy to post the official version of what we're calling "lily2image," a script for converting lilypond source files to cropped image files in many different formats suitable

Re: png cropping

2008-10-02 Thread Jonathan Kulp
If you have the skills to translate it to Windows that'd be great. I don't know the first thing about Windows so I can't do it myself. I'd really appreciate it if someone could make a Windows version of lily2image :) Jon Tomas Valusek wrote: Jonathan Kulp napsal(a): After much revision,

Re: png cropping

2008-10-02 Thread Josh Parmenter
If you are familiar with scripting, and have Windows, use it as a template. But my guess is you will need to find different utilities to do the conversion and cropping. This is pretty straight-forward to do, since most of these utilities run just fine on linux and mac (though most scripts c

Re: png cropping

2008-10-02 Thread Tomas Valusek
Jonathan Kulp napsal(a): After much revision, addition, and general fussing about with it, I'm happy to post the official version of what we're calling "lily2image," a script for converting lilypond source files to cropped image files in many different formats suitable for insertion into doc

Re: png cropping

2008-10-01 Thread Jonathan Kulp
After much revision, addition, and general fussing about with it, I'm happy to post the official version of what we're calling "lily2image," a script for converting lilypond source files to cropped image files in many different formats suitable for insertion into documents (theses, research pa

Re: png cropping

2008-09-19 Thread Jonathan Kulp
I'd like to try to implement the -q quiet mode and see if I can do it. I think with all of Patrick's flags I can see how he's been doing it and make the -q work. Hopefully tonight after the kids are asleep. Jon Josh Parmenter wrote: That makes sense as well. Josh On Sep 19, 2008, at 3:09 PM

Re: png cropping

2008-09-19 Thread Josh Parmenter
That makes sense as well. Josh On Sep 19, 2008, at 3:09 PM, Patrick Horgan wrote: Jonathan Kulp wrote: Thanks for trying it out, Josh! Glad to hear it worked for you on OSX. Patrick has been dealing with the flags, and I don't really understand how to do them, so my very dirty solution

Re: png cropping

2008-09-19 Thread Patrick Horgan
Jonathan Kulp wrote: Thanks for trying it out, Josh! Glad to hear it worked for you on OSX. Patrick has been dealing with the flags, and I don't really understand how to do them, so my very dirty solution would be simply to comment out the last bit of the script that opens the file :). I c

Re: png cropping

2008-09-19 Thread Josh Parmenter
Not on OSX. You are using the 'open' command, and this will open the file regardless of the viewer that is passed in. Josh On Sep 19, 2008, at 2:51 PM, Patrick Horgan wrote: Josh Parmenter wrote: I've been following this, and just tested the latest version on OSX... quite nice guys! Perh

Re: png cropping

2008-09-19 Thread Jonathan Kulp
Thanks for trying it out, Josh! Glad to hear it worked for you on OSX. Patrick has been dealing with the flags, and I don't really understand how to do them, so my very dirty solution would be simply to comment out the last bit of the script that opens the file :). I can see how this would

Re: png cropping

2008-09-19 Thread Patrick Horgan
Josh Parmenter wrote: I've been following this, and just tested the latest version on OSX... quite nice guys! Perhaps the -V flag can be set to not open the image after it is done? This utility will be great for mass creating images (as most command line tools are), but having Preview open ea

Re: png cropping

2008-09-19 Thread Josh Parmenter
I've been following this, and just tested the latest version on OSX... quite nice guys! Perhaps the -V flag can be set to not open the image after it is done? This utility will be great for mass creating images (as most command line tools are), but having Preview open each one up will get v

Re: png cropping

2008-09-19 Thread Jonathan Kulp
Ok I've caught on to your version-control comments at the top and have started adding to them. This time I added two things to the script: 1) recognition of the computer's OS (only Linux or Mac at this point), and appropriate changes to the commands to accommodate. After this change, the scr

Re: png cropping

2008-09-19 Thread Patrick Horgan
Mark Knoop wrote: On Thu, 2008-09-18 at 17:41 -0700, Patrick Horgan wrote: Of course if you pick one that eog doesn't know how to display it will complain. Perhaps replace eog with xdg-open for better portability? "xdg-open - opens a file or URL in the user’s pref

Re: png cropping

2008-09-19 Thread Patrick Horgan
Jonathan Kulp wrote: Patrick!  It's all working beautifully now. I must say that you are most awesomely cool.  How wonderful to find someone that digs in in the best linux/Unix tradition and puts together a string of programs to achieve a desired result.  Hats off to you. ... much cool stuff

Re: png cropping

2008-09-19 Thread Jonathan Kulp
This is a good idea. I tried it and it behaves exactly the same as before. I had wondered about this, not with respect to the different file formats, but with different desktop environments. I imagine eog wouldn't behave properly in KDE, for example. Does xdg-open work for KDE? Or does tha

Re: png cropping

2008-09-19 Thread Mark Knoop
On Thu, 2008-09-18 at 17:41 -0700, Patrick Horgan wrote: > Of course if you pick one that eog doesn't know how to display it > will complain. Perhaps replace eog with xdg-open for better portability? "xdg-open - opens a file or URL in the user’s preferred application" -- Mark Knoop ___

Re: png cropping

2008-09-18 Thread Jonathan Kulp
Patrick! It's all working beautifully now. I've tried about 10 different configurations of options using both the flags and the prompts, and everything worked just as expected. This is a really great tool! I like being able to use either the command-line arguments or the prompts. The argumen

Re: png cropping

2008-09-18 Thread Patrick Horgan
Jonathan Kulp wrote: Hi Patrick, I've been running your script trying to use the command-line arguments, and something's happening with the format argument. I specify it with an argument, but then I still get prompted for format. I might not be doing the flag right. I've tried it with -f=

Re: png cropping

2008-09-18 Thread Patrick Horgan
Alright, this is probably my last version. It now checks the input for format against all the available conversions (found by looking for all the programs in the filesystem that start with ppmto and pnmto) and if you didn't pick one, gives you all the choices! Enter desired output format

Re: png cropping

2008-09-18 Thread Jonathan Kulp
Hi Patrick, I've been running your script trying to use the command-line arguments, and something's happening with the format argument. I specify it with an argument, but then I still get prompted for format. I might not be doing the flag right. I've tried it with -f=jpeg, -f=JPEG, -fJPEG,

Re: png cropping

2008-09-18 Thread Jonathan Kulp
Cool, Patrick! Your scripting skills are admirable! The only thing that worked unlike I expected was when I was asked if I wanted transparency, I simply hit "enter," thinking it would default to "no" because the N was capitalized, and it prompted me again saying "expecting one of these values

Re: png cropping

2008-09-18 Thread Patrick Horgan
Jonathan Kulp wrote: Ok I changed a couple of things to make it even more flexible.  I changed pnmto__ to ppmto__, giving quite a few more output options. I've suggested a few in the script.  Also added an option to choose either gif or png when choosing transparent background.  this is fun :)

Re: png cropping

2008-09-17 Thread Jonathan Kulp
Patrick, Sorry to keep posting new versions but I found another problem with my previous one, which is that there's no ppmtopng command, so I had to add another if-then statement to fix it. I also learned a couple of things from your script that are very useful (e.g. accepting equally "yes,"

Re: png cropping

2008-09-17 Thread Jonathan Kulp
This looks really great but it failed when I tried to run it. I must have messed it up when copying it over to my editor. Would you mind attaching a working copy as a file instead of copying into the email? Also, I think we crossed paths in our most recent posts about this. I sent a revised

Re: png cropping

2008-09-17 Thread Neil Puttock
2008/9/18 Patrick Horgan <[EMAIL PROTECTED]>: > There must be more than this--I don't get any .png file when I use this > option. Only postscript and pdf. You have to use it with --png or -fpng or --format=png. Regards, Neil ___ lilypond-user mailin

Re: png cropping

2008-09-17 Thread Jonathan Kulp
Sorry, one more adjustment to the script. I found out that there's no ppmtotiff command, so I had to add another conditional to accommodate that. Seems to work with all combinations now: #!/bin/bash #*# # Script for making image files from

Re: png cropping

2008-09-17 Thread Patrick Horgan
Neil Puttock wrote: Hi Jon, 2008/9/17 Jonathan Kulp <[EMAIL PROTECTED]>: I'm guessing that one of the netpbm tools will handle transparency, it's just a matter of figuring out which one. Didn't this come up on a recent thread? I seem to remember trying it out on something and ge

Re: png cropping

2008-09-17 Thread Patrick Horgan
Here's a modified version of Jonathan's unix/linux script that supports arguments which are: -t or --transparency : output format forced to png and you get transparency -r=N or --resolution==N : (example -r=72) set resolution -f=FORMAT or --format=FORMAT : (example -f=jpeg) set

Re: png cropping

2008-09-17 Thread Jonathan Kulp
Ok I changed a couple of things to make it even more flexible. I changed pnmto__ to ppmto__, giving quite a few more output options. I've suggested a few in the script. Also added an option to choose either gif or png when choosing transparent background. this is fun :) Jon script attached

Re: png cropping

2008-09-17 Thread Jonathan Kulp
Ok I rewrote it a bit to allow for transparent background and I think it works nicely. I changed it to ask whether the user wants a transparent background right after entering the output resolution. If transparent = yes, then it does not prompt for an output format but instead uses png by def

Re: png cropping

2008-09-17 Thread Patrick Horgan
Jonathan Kulp wrote: I'm guessing that one of the netpbm tools will handle transparency, it's just a matter of figuring out which one. Didn't this come up on a recent thread? I seem to remember trying it out on something and getting a transparent background. When I get some time later I'll

Re: png cropping

2008-09-17 Thread Patrick Horgan
Josh Parmenter wrote: You can set the tagline to "" in the \header block. Ah, but I specifically asked for a way to do it without editing the file so the script to do it via command line argument. This just doesn't make the cut NEXT! Patrick __

Re: png cropping

2008-09-17 Thread Neil Puttock
Hi Jon, 2008/9/17 Jonathan Kulp <[EMAIL PROTECTED]>: > I'm guessing that one of the netpbm tools will handle transparency, it's > just a matter of figuring out which one. Didn't this come up on a recent > thread? I seem to remember trying it out on something and getting a > transparent backgroun

Re: png cropping

2008-09-17 Thread Jonathan Kulp
I'm guessing that one of the netpbm tools will handle transparency, it's just a matter of figuring out which one. Didn't this come up on a recent thread? I seem to remember trying it out on something and getting a transparent background. When I get some time later I'll look into it. It woul

Re: png cropping

2008-09-17 Thread Josh Parmenter
You can set the tagline to "" in the \header block. %% SuperCollider output from Wed Sep 17 12:58:57 2008 \paper { #(set-paper-size "letter") } \include "english.ly" \header { tagline = "" } %Voice0 soprano = \new Voice = "soprano" { < c' ef' g'>4 < b f' g'>4

Re: png cropping

2008-09-17 Thread Patrick Horgan
Jonathan Kulp wrote: This is an old thread but I found it in my email box and thought I'd respond because I've recently written a script to handle this sort of thing. I share with some trepidation since last time I shared a script, someone pointed out to me that there was already a lilypond c

Re: png cropping

2008-09-17 Thread Jonathan Kulp
This is an old thread but I found it in my email box and thought I'd respond because I've recently written a script to handle this sort of thing. I share with some trepidation since last time I shared a script, someone pointed out to me that there was already a lilypond command-line option tha

Re: png cropping

2008-08-19 Thread Graham Percival
On Tue, 19 Aug 2008 14:41:24 + David Bobroff <[EMAIL PROTECTED]> wrote: > I'm LilyPonding a piece which requires a "Notation Key". The > recipient of this notation key will be doing a bit of further > manipulation of the output. What I need to provide is, at her > preference, a PNG closely c

png cropping

2008-08-19 Thread David Bobroff
I'm LilyPonding a piece which requires a "Notation Key". The recipient of this notation key will be doing a bit of further manipulation of the output. What I need to provide is, at her preference, a PNG closely cropped so that she can then position this graphic under some introductory text ab