libansilove

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

commit b6a0737b6ae40b5af03e9c6fd2f8b793d3dd4a1b
parent 64a02cf4edeb4ca0cd6a3c6ae290b9d77b18b656
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri, 29 Jun 2018 21:52:16 +0200

The columns value from the input struct should only be used in the binary loader

Diffstat:
Msrc/loaders/pcboard.c | 2+-
Msrc/loaders/tundra.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/loaders/pcboard.c b/src/loaders/pcboard.c @@ -144,7 +144,7 @@ void pcboard(struct input *inputFile, struct output *outputFile) rowMax++; // allocate buffer image memory - canvas = gdImageCreate(inputFile->columns * outputFile->bits, (rowMax)*fontData.height); + canvas = gdImageCreate(80 * outputFile->bits, (rowMax)*fontData.height); // allocate black color and create background canvas gdImageColorAllocate(canvas, 0, 0, 0); diff --git a/src/loaders/tundra.c b/src/loaders/tundra.c @@ -89,7 +89,7 @@ void tundra(struct input *inputFile, struct output *outputFile) } // allocate buffer image memory - canvas = gdImageCreateTrueColor(inputFile->columns * outputFile->bits, (row) * fontData.height); + canvas = gdImageCreateTrueColor(80 * outputFile->bits, (row) * fontData.height); if (!canvas) { perror("Error, can't allocate buffer image memory");