ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit 9b1bba2e74f5e68a5709dc329252cb0b46ced5f4
parent 1206bccbf45baab12a83504749efa2104e70f838
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Wed,  9 Dec 2015 15:10:32 +0100

Honoring custom output file names for additional retina images

Diffstat:
Msrc/main.c | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/main.c b/src/main.c @@ -204,9 +204,17 @@ int main(int argc, char *argv[]) } if (createRetinaRep) { - int retinaLen = strlen(input) + 8; + char *outputName; + + if (!output) { + outputName = input; + } else { + outputName = output; + } + + int retinaLen = strlen(outputName) + 8; retinaout = malloc(retinaLen); - snprintf(retinaout, retinaLen, "%s%s", input, "@2x.png"); + snprintf(retinaout, retinaLen, "%s%s", outputName, "@2x.png"); } // default to 8 if bits option is not specified