From b1174882799a6d39796a14c9b28fb4977144a480 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Tue, 11 Feb 2025 15:53:36 +1100 Subject: [PATCH] example/stb-imagedumper: add -natural-size flag --- example/stb-imagedumper/stb-imagedumper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/stb-imagedumper/stb-imagedumper.c b/example/stb-imagedumper/stb-imagedumper.c index 0496f3ce..47246ff8 100644 --- a/example/stb-imagedumper/stb-imagedumper.c +++ b/example/stb-imagedumper/stb-imagedumper.c @@ -604,7 +604,8 @@ static const char* g_usage = " -B or -braille-art-dark-mode (use white-on-black Braille art)\n" " -b or -braille-art-light-mode (use black-on-white Braille art)\n" " -demo (dump the built-in demonstration images)\n" - " -n use the image's natural size; this overrides -resize=N\n" + " -n or -natural-size (use each image's natural size); this\n" + " overrides -resize=N\n" " -resize=N (resize to fit in N×N, N≤1024); if neither this\n" " or -n is given, the default is -resize=64\n"; @@ -648,7 +649,7 @@ parse_flags(int argc, char** argv) { g_flags.demo = true; continue; } - if (!strcmp(arg, "n")) { + if (!strcmp(arg, "n") || !strcmp(arg, "natural-size")) { g_flags.natural_size = true; continue; }