libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit c71865eec0e8516aeda4e873b6e1822f8413ccc3
parent 64265edcfb64086b1aded9063ae3c9ed93a73a04
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu,  3 Oct 2019 22:23:47 +0200

Also allow setting transparent background for retina images.

Diffstat:
Msrc/output.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/output.c b/src/output.c @@ -62,6 +62,10 @@ output(struct ansilove_ctx *ctx, struct ansilove_options *options, /* create retina output image */ gdImageDestroy(im_Source); + + if (options->mode == ANSILOVE_MODE_TRANSPARENT) + gdImageColorTransparent(im_Retina, 0); + ctx->png.buffer = gdImagePngPtr(im_Retina, &ctx->png.length); gdImageDestroy(im_Retina); }