![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 29-6-2011 7:20, Aditya Mahajan wrote:
On Wed, 29 Jun 2011, Hans Hagen wrote:
Such a plugin looks like:
\startluacode figures.converters.png = { png = function(oldname,newname,resolution) local command = string.format('gm convert -depth 1 "%s" "%s"',oldname,newname) logs.report(string.format("running command %s",command)) os.execute(command) end } \stopluacode
Don't you need to use 'resolution' somewhere in the function?
Well, not 'need' but it would make sense of course to use that info, for instance to set the depth or resolution but I wasn't in the mood for studying the man pages (and I always forget the command line arguments), so I leave that 'as an exercise for the reader'. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------