Skip to content

Support non-transparent backgrounds #2

@dehnert

Description

@dehnert

In some situations, it's nice to have a non-transparent background (eg, the image will be shown on top of both a white background and something dark, and rather than finding a foreground that'll work with both you just want a white box as your background regardless).

It would be nice if the API supported an option for keeping the background in place.

For example,

{
	'code': '\begin{document} Hello \end{document}',
	'format': 'pdf',
        'background': 'opaque' [or default, 'transparent']
}

I think an opaque background is just a matter of adding to ~COMMAND_IMG_CONVERT in jobs.py '-alpha', 'deactivate' before the -density 200 when requested.

If you think this would be useful / would be willing to take such a change, I'd be happy to put together a PR (but figured checking before writing it might make sense, and probably won't have a chance for a couple days).

(And thanks for this tool!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions