New Device: PNG output

24 views
Skip to first unread message

luserdroog

unread,
May 28, 2016, 4:36:47 AM5/28/16
to xpost-discuss
This is driving some development of the interpreter and the API. Now all C devices have their Destroy function called at interpreter exit, where formerly only the window devices were destroyed.

The PNG device will also need extra options from the command-line, and so a general means for this must be added to the API. The current idea is to add a function xpost_add_definitions(char **defs, int n); where defs is an argv-style array in the form "key=value". We can use --def for a long-form option, but I'm not sure what to do for a short-form. -d is select device, and -D is list available devices.

Maybe I can persuade Vincent to add the device list to the --help so we can use -D for definitions.

But the PNG device appears to be working. But only for single-page illustrations. We may incorporate %d in the filename to manage multiple pages with numbered pngs for each one.




vincent.torri

unread,
Jun 1, 2016, 2:35:04 AM6/1/16
to xpost-discuss


> Le samedi 28 mai 2016 10:36:47 UTC+2, luserdroog a écrit :
> This is driving some development of the interpreter and the API. Now all C devices have their Destroy function called at interpreter exit, where formerly only the window devices were destroyed.

> The PNG device will also need extra options from the command-line, and so a general means for this must be added to the API. The current idea is to add a function xpost_add_definitions(char **defs, int n); where defs is an argv-style array in the form "key=value".
> We can use --def for a long-form option, but I'm not sure what to do for a short-form. -d is select device, and -D is list available devices.

> Maybe I can persuade Vincent to add the device list to the --help so we can use -D for definitions.

It's done :-)


> But the PNG device appears to be working. But only for single-page illustrations. We may incorporate %d in the filename to manage multiple pages with numbered pngs for each one.

That would be nice. We can have some psware (like the dviware in CTAN) : pspng etc... :-)

vincent.torri

unread,
Jun 12, 2016, 3:01:19 PM6/12/16
to xpost-discuss

I have added the compression level and interlaced features for the PNG device.

Vincent
Reply all
Reply to author
Forward
0 new messages